[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-873-g98d16fa
Brad King
brad.king at kitware.com
Tue Nov 25 11:31:37 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 98d16fa395b87816f24df3eeb29dc12ee9bf49e7 (commit)
via 6b045c3ba8be63fbb3cd8dc026e984184696730c (commit)
from d66028f0df53660e779fdc869e5d3d43368aadb6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98d16fa395b87816f24df3eeb29dc12ee9bf49e7
commit 98d16fa395b87816f24df3eeb29dc12ee9bf49e7
Merge: d66028f 6b045c3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 25 11:31:37 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 25 11:31:37 2014 -0500
Merge topic 'ccmake-system-form' into next
6b045c3b ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b045c3ba8be63fbb3cd8dc026e984184696730c
commit 6b045c3ba8be63fbb3cd8dc026e984184696730c
Author: Ådne Hovda <ahovda at openit.com>
AuthorDate: Tue Nov 18 21:47:02 2014 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 25 11:29:58 2014 -0500
ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58e0a1f..ba7f129 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
# Allow the user to enable/disable all system utility library options by
# defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
- set(UTILITIES BZIP2 CURL EXPAT LIBARCHIVE LIBLZMA ZLIB)
+ set(UTILITIES BZIP2 CURL EXPAT FORM LIBARCHIVE LIBLZMA ZLIB)
foreach(util ${UTILITIES})
if(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
AND DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
@@ -95,6 +95,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
"${CMAKE_USE_SYSTEM_LIBRARY_BZIP2}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_LIBLZMA "Use system-installed liblzma"
"${CMAKE_USE_SYSTEM_LIBRARY_LIBLZMA}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
+ option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}")
# Mention to the user what system libraries are being used.
foreach(util ${UTILITIES})
@@ -394,7 +395,11 @@ macro (CMAKE_BUILD_UTILITIES)
set(BUILD_CursesDialog 0)
endif ()
if(BUILD_CursesDialog)
- add_subdirectory(Source/CursesDialog/form)
+ if(NOT CMAKE_USE_SYSTEM_FORM)
+ add_subdirectory(Source/CursesDialog/form)
+ elseif(NOT CURSES_FORM_LIBRARY)
+ message( FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!" )
+ endif()
endif()
endmacro ()
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)
diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in
index b0b5779..726c843 100644
--- a/Utilities/cmThirdParty.h.in
+++ b/Utilities/cmThirdParty.h.in
@@ -19,6 +19,7 @@
#cmakedefine CMAKE_USE_SYSTEM_BZIP2
#cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE
#cmakedefine CMAKE_USE_SYSTEM_LIBLZMA
+#cmakedefine CMAKE_USE_SYSTEM_FORM
#cmakedefine CTEST_USE_XMLRPC
#endif
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 9 +++++++--
Source/CursesDialog/CMakeLists.txt | 18 +++++++++++++++---
Utilities/cmThirdParty.h.in | 1 +
3 files changed, 23 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list