[cmake-commits] hoffman committed CMakeLists.txt 1.9 1.10
QtDialogCPack.cmake.in NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Sat Feb 9 09:53:54 EST 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv18446/Source/QtDialog
Modified Files:
CMakeLists.txt
Added Files:
QtDialogCPack.cmake.in
Log Message:
ENH: make it so cmake-gui only installs if qt is static on windows
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeLists.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CMakeLists.txt 7 Feb 2008 16:43:20 -0000 1.9
+++ CMakeLists.txt 9 Feb 2008 14:53:52 -0000 1.10
@@ -1,4 +1,4 @@
-
+PROJECT(QtDialog)
SET(QT_MIN_VERSION "4.2.0")
FIND_PACKAGE(Qt4 REQUIRED)
@@ -7,9 +7,14 @@
ELSE(NOT QT4_FOUND)
INCLUDE(${QT_USE_FILE})
- IF(QT_CONFIG MATCHES "static")
- SET(CMAKE_QT_IS_STATIC TRUE CACHE STATIC "")
- ENDIF(QT_CONFIG MATCHES "static")
+ SET(CMAKE_PACKAGE_QTGUI TRUE)
+ # i don't want to install or package the qt gui on windows
+ # unless qt is static
+ IF(WIN32 AND NOT QT_CONFIG MATCHES "static")
+ SET(CMAKE_PACKAGE_QTGUI FALSE)
+ ENDIF(WIN32 AND NOT QT_CONFIG MATCHES "static")
+ CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
+ "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake")
SET(SRCS
AddCacheEntry.cxx
AddCacheEntry.h
@@ -51,12 +56,9 @@
TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
# if qt is not static and we are on windows then skip the install
# I don't want to distribute qt dlls
- IF(WIN32 AND NOT CMAKE_QT_IS_STATIC)
- SET(SKIP_INSTALL TRUE)
- ENDIF(WIN32 AND NOT CMAKE_QT_IS_STATIC)
- IF(NOT SKIP_INSTALL)
+ IF(CMAKE_PACKAGE_QTGUI)
INSTALL_TARGETS(/bin cmake-gui)
- ENDIF(NOT SKIP_INSTALL)
+ ENDIF(CMAKE_PACKAGE_QTGUI)
ENDIF(NOT QT4_FOUND)
--- NEW FILE: QtDialogCPack.cmake.in ---
SET(CMAKE_PACKAGE_QTGUI @CMAKE_PACKAGE_QTGUI@)
IF(CMAKE_PACKAGE_QTGUI)
SET(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "cmake-gui" "cmake-gui(beta)")
ENDIF(CMAKE_PACKAGE_QTGUI)
More information about the Cmake-commits
mailing list