diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-19 19:26:20 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-19 19:26:20 (GMT) |
commit | ee2a13b11f08efcde4ec3579763ae3236b278693 (patch) | |
tree | d723719d70a05ef8302fafa71960bda98c088407 /Source/QtDialog | |
parent | 4a9517a688d0bff682b538a272794000de56641d (diff) | |
download | CMake-ee2a13b11f08efcde4ec3579763ae3236b278693.zip CMake-ee2a13b11f08efcde4ec3579763ae3236b278693.tar.gz CMake-ee2a13b11f08efcde4ec3579763ae3236b278693.tar.bz2 |
ENH: install working with symlink qt tool
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Source/QtDialog/QtDialogCPack.cmake.in | 14 | ||||
-rwxr-xr-x | Source/QtDialog/postflight.sh.in | 4 | ||||
-rwxr-xr-x | Source/QtDialog/postupgrade.sh.in | 2 |
4 files changed, 25 insertions, 7 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index a2cfdbf..dc77a28 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -13,8 +13,6 @@ ELSE(NOT QT4_FOUND) 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 @@ ELSE(NOT QT4_FOUND) ${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) diff --git a/Source/QtDialog/QtDialogCPack.cmake.in b/Source/QtDialog/QtDialogCPack.cmake.in index fc1fa79..27bcbad 100644 --- a/Source/QtDialog/QtDialogCPack.cmake.in +++ b/Source/QtDialog/QtDialogCPack.cmake.in @@ -3,11 +3,15 @@ SET(CMAKE_PACKAGE_QTGUI @CMAKE_PACKAGE_QTGUI@) 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) diff --git a/Source/QtDialog/postflight.sh.in b/Source/QtDialog/postflight.sh.in new file mode 100755 index 0000000..88dd066 --- /dev/null +++ b/Source/QtDialog/postflight.sh.in @@ -0,0 +1,4 @@ +#!/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 diff --git a/Source/QtDialog/postupgrade.sh.in b/Source/QtDialog/postupgrade.sh.in new file mode 100755 index 0000000..06bd986 --- /dev/null +++ b/Source/QtDialog/postupgrade.sh.in @@ -0,0 +1,2 @@ +#!/bin/bash +exit 0 |