diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-09 14:53:52 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-09 14:53:52 (GMT) |
commit | f6014938cbb4a914ed5b549261a0c06215593c30 (patch) | |
tree | ddcf95907670ac1fe393f19f05a06218458a0f03 /Source/QtDialog/CMakeLists.txt | |
parent | 445f47473c205d9d310a6a51c14fa7ac98c2cad0 (diff) | |
download | CMake-f6014938cbb4a914ed5b549261a0c06215593c30.zip CMake-f6014938cbb4a914ed5b549261a0c06215593c30.tar.gz CMake-f6014938cbb4a914ed5b549261a0c06215593c30.tar.bz2 |
ENH: make it so cmake-gui only installs if qt is static on windows
Diffstat (limited to 'Source/QtDialog/CMakeLists.txt')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 6576539..8670642 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -1,4 +1,4 @@ - +PROJECT(QtDialog) SET(QT_MIN_VERSION "4.2.0") FIND_PACKAGE(Qt4 REQUIRED) @@ -7,9 +7,14 @@ IF(NOT QT4_FOUND) 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 @@ ELSE(NOT QT4_FOUND) 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) |