Skip to content
Permalink
Browse files

Merge pull request #5202 from dmarteau/fix_ln_option_OSX

Execute ln command with GNU compatible options in install phase
  • Loading branch information
dakcarto committed Sep 22, 2017
2 parents 9caa722 + 5534d74 commit 559973739c3b2c8523210b1219c225594358cb6f
Showing with 10 additions and 10 deletions.
  1. +2 −2 cmake/MacBundleMacros.cmake
  2. +3 −3 mac/cmake/1qt.cmake.in
  3. +5 −5 tests/bench/CMakeLists.txt
@@ -79,12 +79,12 @@ FUNCTION (COPY_FRAMEWORK FWPREFIX FWNAME FWDEST)
IF (IS_DIRECTORY "${FWDIRPHYS}")
STRING (REGEX MATCH "[^/\n]+$" FWVER "${FWDIRPHYS}")
EXECUTE_PROCESS (COMMAND mkdir -p "${FWDEST}/${FWNAME}.framework/Versions/${FWVER}")
EXECUTE_PROCESS (COMMAND ln -sfh ${FWVER} "${FWDEST}/${FWNAME}.framework/Versions/Current")
EXECUTE_PROCESS (COMMAND ln -sfn ${FWVER} "${FWDEST}/${FWNAME}.framework/Versions/Current")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "${FWPREFIX}/${FWNAME}.framework/Versions/${FWVER}/${FWNAME}" "${FWDEST}/${FWNAME}.framework/Versions/${FWVER}/${FWNAME}")
EXECUTE_PROCESS (COMMAND ln -sf Versions/Current/${FWNAME} "${FWDEST}/${FWNAME}.framework/${FWNAME}")
IF (IS_DIRECTORY "${FWPREFIX}/${FWNAME}.framework/Versions/${FWVER}/Resources")
EXECUTE_PROCESS (COMMAND cp -Rfp "${FWPREFIX}/${FWNAME}.framework/Versions/${FWVER}/Resources" "${FWDEST}/${FWNAME}.framework/Versions/${FWVER}")
EXECUTE_PROCESS (COMMAND ln -sfh Versions/Current/Resources "${FWDEST}/${FWNAME}.framework/Resources")
EXECUTE_PROCESS (COMMAND ln -sfn Versions/Current/Resources "${FWDEST}/${FWNAME}.framework/Resources")
ENDIF (IS_DIRECTORY "${FWPREFIX}/${FWNAME}.framework/Versions/${FWVER}/Resources")
# ensure writable by user, e.g. Homebrew frameworks are installed non-writable
EXECUTE_PROCESS (COMMAND chmod -R u+w "${FWDEST}/${FWNAME}.framework")
@@ -29,11 +29,11 @@ MYMESSAGE ("Qt list: ${QTLISTQG}")
# symlinks when only @executable_path used

IF (NOT @OSX_HAVE_LOADERPATH@)
EXECUTE_PROCESS (COMMAND ln -sfh ../Frameworks "${QAPPDIR}/")
EXECUTE_PROCESS (COMMAND ln -sfn ../Frameworks "${QAPPDIR}/")
IF (IS_DIRECTORY "${QLIBXIR}/grass/bin")
EXECUTE_PROCESS (COMMAND ln -sfh ../@QGIS_LIBEXEC_SUBDIR_REV@/@QGIS_FW_SUBDIR@ "${QLIBXDIR}/grass/Frameworks")
EXECUTE_PROCESS (COMMAND ln -sfn ../@QGIS_LIBEXEC_SUBDIR_REV@/@QGIS_FW_SUBDIR@ "${QLIBXDIR}/grass/Frameworks")
ENDIF ()
EXECUTE_PROCESS (COMMAND ln -sfh @QGIS_CGIBIN_SUBDIR_REV@/@QGIS_LIB_SUBDIR@ "${QCGIDIR}/lib")
EXECUTE_PROCESS (COMMAND ln -sfn @QGIS_CGIBIN_SUBDIR_REV@/@QGIS_LIB_SUBDIR@ "${QCGIDIR}/lib")
ENDIF (NOT @OSX_HAVE_LOADERPATH@)

### copy files
@@ -58,12 +58,12 @@ INSTALL (TARGETS qgis_bench
RUNTIME DESTINATION ${QGIS_BIN_DIR}
)
IF (APPLE)
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfh ../../../${QGIS_FW_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/Frameworks\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfh ../../../../${QGIS_LIB_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/MacOS/lib\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfh ../../../${QGIS_PLUGIN_SUBDIR}/.. \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/Plugins\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfh ../../../${QGIS_DATA_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/Resources\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfn ../../../${QGIS_FW_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/Frameworks\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfn ../../../../${QGIS_LIB_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/MacOS/lib\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfn ../../../${QGIS_PLUGIN_SUBDIR}/.. \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/Plugins\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfn ../../../${QGIS_DATA_SUBDIR} \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/Resources\")")
# may not exist, unless BundleUtilities are used
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfh ../../../../share \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/MacOS/share\")")
INSTALL (CODE "EXECUTE_PROCESS(COMMAND ln -sfn ../../../../share \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/qgis_bench.app/Contents/MacOS/share\")")

ENDIF (APPLE)

0 comments on commit 5599737

Please sign in to comment.
You can’t perform that action at this time.