--- Source/QtDialog/CMakeLists.txt.orig +++ Source/QtDialog/CMakeLists.txt @@ -308,7 +308,8 @@ OUTPUT_NAME CMake MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in" MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}" - # TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}" + MACOSX_BUNDLE_LONG_VERSION_STRING "${CMAKE_BUNDLE_VERSION}-MacPorts" + MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}" MACOSX_BUNDLE_COPYRIGHT "${copyright_line}" MACOSX_BUNDLE_GUI_IDENTIFIER "org.cmake.cmake" ) @@ -345,8 +346,12 @@ endif() if(APPLE) + # at install time, create a symlink from the CMake executable to + # bin/cmake-gui. Note that there is a build-time symlink created + # above, but it is used just during build and test, and not + # installed. This one is created in the installation. install(CODE " - execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui + execute_process(COMMAND ln -s \"${CMAKE_BUNDLE_LOCATION}/CMake.app/Contents/MacOS/CMake\" cmake-gui WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin) " ${COMPONENT}) endif() --- Source/QtDialog/Info.plist.in.orig +++ Source/QtDialog/Info.plist.in @@ -2,8 +2,15 @@ + LSEnvironment + + PATH + ${CMAKE_INSTALL_PREFIX}/bin:${CMAKE_INSTALL_PREFIX}/sbin:/usr/bin:/bin:/usr/sbin:/sbin + CFBundleDevelopmentRegion English + CFBundleGetInfoString + CMake - Cross Platform Makefile Generator CFBundleExecutable ${MACOSX_BUNDLE_EXECUTABLE_NAME} CFBundleIconFile @@ -16,6 +23,8 @@ ${MACOSX_BUNDLE_BUNDLE_NAME} CFBundlePackageType APPL + CFBundleLongVersionString + ${MACOSX_BUNDLE_LONG_VERSION_STRING} CFBundleShortVersionString ${MACOSX_BUNDLE_SHORT_VERSION_STRING} CFBundleSignature --- CMakeLists.txt.orig +++ CMakeLists.txt @@ -440,12 +440,20 @@ if(APPLE) set(CMAKE_BUNDLE_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") - set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}") - # make sure CMAKE_INSTALL_PREFIX ends in / - if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$") - string(APPEND CMAKE_INSTALL_PREFIX "/") + if(CMAKE_BUNDLE_LOCATION) + message(STATUS "Using provided bundle location: ${CMAKE_BUNDLE_LOCATION}") + message(STATUS "Using default install prefix: ${CMAKE_INSTALL_PREFIX}") + else() + set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}") + # make sure CMAKE_INSTALL_PREFIX ends in / + if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$") + set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/") + endif() + set(CMAKE_INSTALL_PREFIX + "${CMAKE_INSTALL_PREFIX}CMake.app/Contents") + message(STATUS "Using default Qt bundle location: ${CMAKE_BUNDLE_LOCATION}") + message(STATUS "Using special install prefix: ${CMAKE_INSTALL_PREFIX}") endif() - string(APPEND CMAKE_INSTALL_PREFIX "CMake.app/Contents") endif() endif()