aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/configure.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/configure.cmake')
-rw-r--r--cmake/configure.cmake40
1 files changed, 22 insertions, 18 deletions
diff --git a/cmake/configure.cmake b/cmake/configure.cmake
index 38265b98..cd66e24b 100644
--- a/cmake/configure.cmake
+++ b/cmake/configure.cmake
@@ -143,13 +143,15 @@ DefineHFileIfAvailable(stdint.h HAVE_STDINT_H)
DefineHFileIfAvailable(inttypes.h HAVE_INTTYPES_H)
DefineHFileIfAvailable(stdlib.h HAVE_STDLIB_H)
DefineHFileIfAvailable(unistd.h HAVE_UNISTD_H)
-DefineFunctionIfAvailable(gettext HAVE_GETTEXT)
-DefineFunctionIfAvailable(dcgettext HAVE_DCGETTEXT)
+if (CMAKE_HOST_UNIX)
+ DefineFunctionIfAvailable(gettext HAVE_GETTEXT)
+ DefineFunctionIfAvailable(dcgettext HAVE_DCGETTEXT)
FIND_PACKAGE(Gettext REQUIRED)
-# FIND_PACKAGE(XGettext REQUIRED)
-# FIND_PACKAGE(Iconv REQUIRED)
+ # FIND_PACKAGE(XGettext REQUIRED)
+ # FIND_PACKAGE(Iconv REQUIRED)
FIND_PATH(INTL_INCLUDE_DIR libintl.h PATHS /usr/include /usr/local/include)
FIND_LIBRARY(INTL_LIBRARIES intl c PATHS /usr/lib/ /usr/local/lib)
+endif()
DefineSymbolIfAvailable("CODESET" "langinfo.h" HAVE_LANGINFO_CODESET)
DefineSymbolIfAvailable("LC_MESSAGES" "locale.h" HAVE_LC_MESSAGES)
DefineTypeIfAvailable("_Bool" HAVE__BOOL)
@@ -246,22 +248,24 @@ DefineFunctionIfAvailable(mbrtowc HAVE_MBRTOWC)
add_definitions(-D HAVE_STRINGIZE)
add_definitions(-D _Noreturn=)
-find_package(BISON REQUIRED)
-if (${BISON_FOUND} STREQUAL "TRUE")
- BISON_TARGET(awkgram awkgram.y ${CMAKE_SOURCE_DIR}/awkgram.c)
-endif()
+if (CMAKE_HOST_UNIX)
+ find_package(BISON REQUIRED)
+ if (${BISON_FOUND} STREQUAL "TRUE")
+ BISON_TARGET(awkgram awkgram.y ${CMAKE_SOURCE_DIR}/awkgram.c)
+ endif()
-#http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:FindGettext
-find_package(Gettext REQUIRED)
-if (GETTEXT_FOUND STREQUAL "TRUE")
- include_directories(${GETTEXT_INCLUDE_DIR})
-else ()
- message( FATAL_ERROR "Gettext not found" )
-endif()
+ #http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:FindGettext
+ find_package(Gettext REQUIRED)
+ if (GETTEXT_FOUND STREQUAL "TRUE")
+ include_directories(${GETTEXT_INCLUDE_DIR})
+ else ()
+ message( FATAL_ERROR "Gettext not found" )
+ endif()
-find_package(LATEX)
-include(GNUInstallDirs)
-include(GetPrerequisites)
+ find_package(LATEX)
+ include(GNUInstallDirs)
+ include(GetPrerequisites)
+endif()
# For some unknown reason the defines for the extension
# are written into config.h only if they are implemented