[cmake-commits] hoffman committed CMakeLists.txt 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Feb 7 11:43:23 EST 2008


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv19676/Source/QtDialog

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: for windows only allow a static qt for install and NSIS of cmake-gui


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeLists.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CMakeLists.txt	6 Feb 2008 14:17:03 -0000	1.8
+++ CMakeLists.txt	7 Feb 2008 16:43:20 -0000	1.9
@@ -7,7 +7,9 @@
 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(SRCS
     AddCacheEntry.cxx
     AddCacheEntry.h
@@ -47,8 +49,14 @@
 
   ADD_EXECUTABLE(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
   TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
-
-  INSTALL_TARGETS(/bin cmake-gui)
+  # 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)
+    INSTALL_TARGETS(/bin cmake-gui)
+  ENDIF(NOT SKIP_INSTALL)
 
 ENDIF(NOT QT4_FOUND)
 



More information about the Cmake-commits mailing list