aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 13 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89d39207..97d415d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,17 +83,19 @@ add_executable (gawk ${GAWK_SOURCES} ${BISON_awkgram_OUTPUTS})
target_link_libraries (gawk m ${EXTRA_LIBS})
install(PROGRAMS ${CMAKE_BINARY_DIR}/gawk DESTINATION bin)
-# Beware: before building the extension, -DGAWK gets undefined.
-add_subdirectory(extension)
+if (CMAKE_HOST_UNIX)
+ # Beware: before building the extension, -DGAWK gets undefined.
+ add_subdirectory(extension)
-if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
- enable_testing()
- add_subdirectory(test)
- if (LATEX_COMPILER)
- add_subdirectory(doc)
+ if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
+ enable_testing()
+ add_subdirectory(test)
+ if (LATEX_COMPILER)
+ add_subdirectory(doc)
+ endif()
endif()
-endif()
-include(InstallRequiredSystemLibraries)
-set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
-include(cmake/package.cmake)
+ include(InstallRequiredSystemLibraries)
+ set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
+ include(cmake/package.cmake)
+endif()