]> git.lyx.org Git - features.git/commitdiff
MinGW fixes
authorPeter Kümmel <syntheticpp@gmx.net>
Sun, 20 Apr 2008 11:06:08 +0000 (11:06 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sun, 20 Apr 2008 11:06:08 +0000 (11:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24381 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/ConfigureChecks.cmake
development/cmake/modules/MacroBoolTo01.cmake [new file with mode: 0644]

index a10bfd2e0672e0c1168ccac4d5ef3804e17dcdab..7c3d398cbdde17a4bb442e1522cb32e0fd825cf7 100644 (file)
@@ -12,6 +12,7 @@ include(CheckFunctionExists)
 include(CheckLibraryExists)
 include(CheckTypeSize)
 include(CheckCXXSourceCompiles)
+include(MacroBoolTo01)
 
 
 check_include_file_cxx(aspell.h HAVE_ASPELL_H)
@@ -88,6 +89,8 @@ check_symbol_exists(uintmax_t "stdint.h" HAVE_STDINT_H_WITH_UINTMAX)
 check_symbol_exists(LC_MESSAGES "locale.h" HAVE_LC_MESSAGES)
 
 check_type_size(intmax_t HAVE_INTMAX_T)
+macro_bool_to_01(HAVE_UINTMAX_T HAVE_STDINT_H_WITH_UINTMAX)
+
 check_type_size("long double"  HAVE_LONG_DOUBLE)
 check_type_size("long long"  HAVE_LONG_LONG)
 check_type_size(wchar_t HAVE_WCHAR_T)
diff --git a/development/cmake/modules/MacroBoolTo01.cmake b/development/cmake/modules/MacroBoolTo01.cmake
new file mode 100644 (file)
index 0000000..9dbbffd
--- /dev/null
@@ -0,0 +1,20 @@
+# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )\r
+# This macro evaluates its first argument\r
+# and sets all the given vaiables either to 0 or 1\r
+# depending on the value of the first one\r
+\r
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>\r
+#\r
+# Redistribution and use is allowed according to the terms of the BSD license.\r
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.\r
+\r
+\r
+MACRO(MACRO_BOOL_TO_01 FOUND_VAR )\r
+   FOREACH (_current_VAR ${ARGN})\r
+      IF(${FOUND_VAR})\r
+         SET(${_current_VAR} 1)\r
+      ELSE(${FOUND_VAR})\r
+         SET(${_current_VAR} 0)\r
+      ENDIF(${FOUND_VAR})\r
+   ENDFOREACH(_current_VAR)\r
+ENDMACRO(MACRO_BOOL_TO_01)\r