summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorÅdne Hovda <ahovda@openit.com>2014-11-18 20:47:02 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-25 16:29:58 (GMT)
commit6b045c3ba8be63fbb3cd8dc026e984184696730c (patch)
tree2ed811981054c0a9e527729a41ad5f29820af8f8 /Source/CursesDialog
parent66ba7ea831ca8d44b137e59e8271de3c7756cfe3 (diff)
downloadCMake-6b045c3ba8be63fbb3cd8dc026e984184696730c.zip
CMake-6b045c3ba8be63fbb3cd8dc026e984184696730c.tar.gz
CMake-6b045c3ba8be63fbb3cd8dc026e984184696730c.tar.bz2
ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/CMakeLists.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt
index 548f5a5..7d4e88c 100644
--- a/Source/CursesDialog/CMakeLists.txt
+++ b/Source/CursesDialog/CMakeLists.txt
@@ -26,13 +26,25 @@ set( CURSES_SRCS
CursesDialog/ccmake
)
-include_directories(${CMake_SOURCE_DIR}/Source/CursesDialog/form
- ${CMake_BINARY_DIR}/Source/CursesDialog/form)
+if( NOT CMAKE_USE_SYSTEM_FORM )
+ include_directories(${CMake_SOURCE_DIR}/Source/CursesDialog/form
+ ${CMake_BINARY_DIR}/Source/CursesDialog/form)
+endif()
include_directories(${CURSES_INCLUDE_PATH})
add_executable(ccmake ${CURSES_SRCS} )
target_link_libraries(ccmake CMakeLib)
-target_link_libraries(ccmake cmForm)
+if(CMAKE_USE_SYSTEM_FORM)
+ target_link_libraries(ccmake
+ ${CURSES_FORM_LIBRARY}
+ ${CURSES_LIBRARY}
+ )
+ if(CURSES_EXTRA_LIBRARY)
+ target_link_libraries(ccmake ${CURSES_EXTRA_LIBRARY})
+ endif()
+else()
+ target_link_libraries(ccmake cmForm)
+endif()
install(TARGETS ccmake DESTINATION bin)