summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-08 15:13:13 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-08 15:13:13 (GMT)
commit6fe45fe9c3348645a0fe145e1f32c487829cea64 (patch)
tree42b6cdc2fdf5eb5febc18587eb39d6a51601cb54
parentdd710c94827b981dbcf7d723303963403bac65ae (diff)
downloadCMake-6fe45fe9c3348645a0fe145e1f32c487829cea64.zip
CMake-6fe45fe9c3348645a0fe145e1f32c487829cea64.tar.gz
CMake-6fe45fe9c3348645a0fe145e1f32c487829cea64.tar.bz2
ENH: Added option BUILD_CursesDialog if curses is found. This allows people to disable building the dialog even when curses is found.
-rw-r--r--CMakeLists.txt11
-rw-r--r--Source/CMakeLists.txt9
-rw-r--r--Utilities/CMakeLists.txt42
3 files changed, 32 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5d7575..613ceaf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,14 +106,21 @@ SET(CMAKE_XMLRPC_INCLUDES
SET(CMAKE_XMLRPC_LIBRARIES "cmXMLRPC")
IF (UNIX)
- INCLUDE (${CMake_SOURCE_DIR}/Modules/FindCurses.cmake OPTIONAL)
+ FIND_PACKAGE(Curses QUIET)
IF (CURSES_LIBRARY)
- SUBDIRS(Source/CursesDialog/form)
+ OPTION(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
ELSE (CURSES_LIBRARY)
MESSAGE("Curses libraries were not found. Curses GUI for CMake will not be build.")
+ SET(BUILD_CursesDialog 0)
ENDIF (CURSES_LIBRARY)
+ELSE (UNIX)
+ SET(BUILD_CursesDialog 0)
ENDIF (UNIX)
+IF(BUILD_CursesDialog)
+ SUBDIRS(Source/CursesDialog/form)
+ENDIF(BUILD_CursesDialog)
+
SUBDIRS(Source Modules Templates Utilities)
ENABLE_TESTING()
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 023a718..c7ef79c 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -291,12 +291,9 @@ ADD_EXECUTABLE(cpack CPack/cpack.cxx)
TARGET_LINK_LIBRARIES(cpack CPackLib)
# Curses GUI
-IF (UNIX)
- INCLUDE (${CMake_SOURCE_DIR}/Modules/FindCurses.cmake OPTIONAL)
- IF (CURSES_LIBRARY)
- INCLUDE(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt)
- ENDIF (CURSES_LIBRARY)
-ENDIF (UNIX)
+IF(BUILD_CursesDialog)
+ INCLUDE(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt)
+ENDIF(BUILD_CursesDialog)
# MFC GUI
# MFC libraries are only available on Visual Studio
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 70b3e28..3bc5840 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -51,28 +51,26 @@ INSTALL_FILES(${CMAKE_DOC_DIR} FILES
SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/ctest.txt)
# Generate documentation for "ccmake" executable.
-IF(UNIX)
- IF(CURSES_LIBRARY)
- SET(CMD ${CMD_DIR}/ccmake${CMD_EXT})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${CMake_BINARY_DIR}/Docs/ccmake.txt
- COMMAND ${CMD}
- ARGS --help-full ${CMake_BINARY_DIR}/Docs/ccmake.txt
- --help-html ${CMake_BINARY_DIR}/Docs/ccmake.html
- --help-man ${CMake_BINARY_DIR}/Docs/ccmake.1
- DEPENDS ccmake
- MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
- )
- INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES
- ${CMake_BINARY_DIR}/Docs/ccmake.1
- )
- INSTALL_FILES(${CMAKE_DOC_DIR} FILES
- ${CMake_BINARY_DIR}/Docs/ccmake.txt
- ${CMake_BINARY_DIR}/Docs/ccmake.html
- )
- SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/ccmake.txt)
- ENDIF(CURSES_LIBRARY)
-ENDIF(UNIX)
+IF(BUILD_CursesDialog)
+ SET(CMD ${CMD_DIR}/ccmake${CMD_EXT})
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMake_BINARY_DIR}/Docs/ccmake.txt
+ COMMAND ${CMD}
+ ARGS --help-full ${CMake_BINARY_DIR}/Docs/ccmake.txt
+ --help-html ${CMake_BINARY_DIR}/Docs/ccmake.html
+ --help-man ${CMake_BINARY_DIR}/Docs/ccmake.1
+ DEPENDS ccmake
+ MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
+ )
+ INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES
+ ${CMake_BINARY_DIR}/Docs/ccmake.1
+ )
+ INSTALL_FILES(${CMAKE_DOC_DIR} FILES
+ ${CMake_BINARY_DIR}/Docs/ccmake.txt
+ ${CMake_BINARY_DIR}/Docs/ccmake.html
+ )
+ SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/ccmake.txt)
+ENDIF(BUILD_CursesDialog)
IF(BUILD_MFCDialog)
SET(CMD ${CMD_DIR}/CMakeSetup${CMD_EXT})