From cecbf6037568f20a5b5a342ce8a29ea8cf9cc5fc Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Thu, 7 Jul 2011 00:16:48 -0700 Subject: [PATCH] Added option BUILD_NO_CURSES You can now do "cmake .. -DBUILD_NO_CURSES=ON" to prevent curses tools from being compiled, since there's a problem using mvwaddwstr() on some Linux distributions. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 173ea571d..97c1aedff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,7 @@ OPTION(BUILD_DFHACK_DOXYGEN "Create doxygen documentation for developers" ON) OPTION(BUILD_DFHACK_SUPPORTED "Build the supported tools." ON) OPTION(BUILD_DFHACK_EXAMPLES "Build example tools" OFF) OPTION(BUILD_DFHACK_PLAYGROUND "Build tools from the playground folder" OFF) +OPTION(BUILD_NO_CURSES "Don't build tools requiring curses" OFF) include_directories (${dfhack_SOURCE_DIR}/library/include/) include_directories (${dfhack_SOURCE_DIR}/library/shm/) @@ -188,7 +189,7 @@ ENDMACRO() # same as above builds a curses tool instead of plain terminal one. MACRO(DFHACK_CURSES_TOOL TOOL_NAME TOOL_SOURCES) - IF(Curses_FOUND) + IF(Curses_FOUND AND NOT BUILD_NO_CURSES) ADD_EXECUTABLE(${TOOL_NAME} ${TOOL_SOURCES}) TARGET_LINK_LIBRARIES(${TOOL_NAME} dfhack curses) if(DEFINED LOCAL_DEPNAME)