diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-04 20:02:50 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-04 20:02:50 (GMT) |
commit | 45ce11a0757a1006a235f34637892115ffeae66e (patch) | |
tree | be7370a18622502f98d774b00cd5606f3fa2ff72 /Source/QtDialog/CMakeLists.txt | |
parent | d1c660d49550af6f174cbfac4ce81bd7d7ce7a75 (diff) | |
download | CMake-45ce11a0757a1006a235f34637892115ffeae66e.zip CMake-45ce11a0757a1006a235f34637892115ffeae66e.tar.gz CMake-45ce11a0757a1006a235f34637892115ffeae66e.tar.bz2 |
ENH: install the mac application bundle into /Applications directly with no enclosing folder
Diffstat (limited to 'Source/QtDialog/CMakeLists.txt')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 2e61c29..de13a7e 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -55,6 +55,10 @@ ELSE(NOT QT4_FOUND) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ADD_EXECUTABLE(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS}) + IF(APPLE) + SET_TARGET_PROPERTIES(cmake-gui PROPERTIES + OUTPUT_NAME ${CMAKE_BUNDLE_NAME}) + ENDIF(APPLE) TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES}) IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) SET(CMAKE_INSTALL_DESTINATION_ARGS @@ -84,8 +88,10 @@ ELSE(NOT QT4_FOUND) "${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(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui + WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)") + INSTALL(CODE "set(input_file + \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}\")") INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake") ENDIF(APPLE) CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in" |