]> git.lyx.org Git - lyx.git/blob - development/cmake/modules/MacroBoolTo01.cmake
9dbbffdff6653717e0e5d0049e8571a16a386751
[lyx.git] / development / cmake / modules / MacroBoolTo01.cmake
1 # MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )\r
2 # This macro evaluates its first argument\r
3 # and sets all the given vaiables either to 0 or 1\r
4 # depending on the value of the first one\r
5 \r
6 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>\r
7 #\r
8 # Redistribution and use is allowed according to the terms of the BSD license.\r
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.\r
10 \r
11 \r
12 MACRO(MACRO_BOOL_TO_01 FOUND_VAR )\r
13    FOREACH (_current_VAR ${ARGN})\r
14       IF(${FOUND_VAR})\r
15          SET(${_current_VAR} 1)\r
16       ELSE(${FOUND_VAR})\r
17          SET(${_current_VAR} 0)\r
18       ENDIF(${FOUND_VAR})\r
19    ENDFOREACH(_current_VAR)\r
20 ENDMACRO(MACRO_BOOL_TO_01)\r