[cmake-commits] hoffman committed CMakeLists.txt 1.14 1.15 QtDialogCPack.cmake.in 1.2 1.3 postflight.sh.in NONE 1.1 postupgrade.sh.in NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Feb 19 14:26:22 EST 2008


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

Modified Files:
	CMakeLists.txt QtDialogCPack.cmake.in 
Added Files:
	postflight.sh.in postupgrade.sh.in 
Log Message:
ENH: install working with symlink qt tool


--- NEW FILE: postupgrade.sh.in ---
#!/bin/bash
exit 0

--- NEW FILE: postflight.sh.in ---
#!/bin/bash
echo "$2/@CMAKE_INSTALL_SUBDIR@/cmake-gui.app/Contents/MacOS/cmake-gui" >>/tmp/mylog
"$2/@CMAKE_INSTALL_SUBDIR@/cmake-gui.app/Contents/MacOS/cmake-gui" --mac-install
exit 0

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeLists.txt,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CMakeLists.txt	19 Feb 2008 19:06:10 -0000	1.14
+++ CMakeLists.txt	19 Feb 2008 19:26:20 -0000	1.15
@@ -13,8 +13,6 @@
   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" @ONLY)    
   SET(SRCS
     AddCacheEntry.cxx
     AddCacheEntry.h
@@ -69,9 +67,19 @@
     ${CMAKE_INSTALL_DESTINATION_ARGS})
   ENDIF(CMAKE_PACKAGE_QTGUI)
   IF(APPLE)
+    SET(CMAKE_POSTFLIGHT_SCRIPT
+      "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh")
+    SET(CMAKE_POSTUPGRADE_SCRIPT
+      "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
+    configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postflight.sh.in"
+      "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh")
+    configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postupgrade.sh.in"
+      "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
     INSTALL(CODE "set(input_file 
        \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/cmake-gui\")")
     INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake")
   ENDIF(APPLE)
+  CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
+    "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)    
 ENDIF(NOT QT4_FOUND)
 

Index: QtDialogCPack.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QtDialogCPack.cmake.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- QtDialogCPack.cmake.in	16 Feb 2008 18:05:03 -0000	1.2
+++ QtDialogCPack.cmake.in	19 Feb 2008 19:26:20 -0000	1.3
@@ -3,11 +3,15 @@
 
 IF(CMAKE_PACKAGE_QTGUI)
   SET(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "cmake-gui" "cmake-gui(beta)") 
-IF(IS_APPLE)
-  # for apple install we set the install prefix to /Applications and then install
-  # cmake into the bundle for cmake-gui
-  SET(CPACK_SET_DESTDIR TRUE)
-ENDIF(IS_APPLE)
+  IF(IS_APPLE)
+    # for apple install we set the install prefix to
+    # / and then install
+    # cmake into the bundle for cmake-gui and must use DESTDIR
+    SET(CPACK_SET_DESTDIR TRUE)
+    # we also want to run post install stuff to setup command line
+    SET(CPACK_POSTFLIGHT_SCRIPT "@CMAKE_POSTFLIGHT_SCRIPT@")
+    SET(CPACK_POSTUPGRADE_SCRIPT "@CMAKE_POSTUPGRADE_SCRIPT@")
+  ENDIF(IS_APPLE)
 ENDIF(CMAKE_PACKAGE_QTGUI)
 
 



More information about the Cmake-commits mailing list