Skip to content

Commit 3ce27d6

Browse files
committed
Hard-link to Mac embedded app bundle binary
- Allows QGIS to be run directly from build directory - Link made at <build dir>/output/bin/QGIS
1 parent 9336e35 commit 3ce27d6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,14 @@ ENDIF (ENABLE_TESTS)
623623
IF (APPLE)
624624
# must be last for install, so install_name_tool can do its work
625625
ADD_SUBDIRECTORY(mac)
626+
627+
# make hard link to embedded app bundle binary (symlink won't work)
628+
# allows QGIS to be run directly from build directory
629+
IF (EXISTS "${CMAKE_BINARY_DIR}/output/bin/QGIS.app/Contents/MacOS/QGIS")
630+
EXECUTE_PROCESS(COMMAND /bin/ln -f
631+
"${CMAKE_BINARY_DIR}/output/bin/QGIS.app/Contents/MacOS/QGIS"
632+
"${CMAKE_BINARY_DIR}/output/bin/QGIS")
633+
ENDIF ()
626634
ENDIF (APPLE)
627635

628636
# manual page - makes sense only on unix systems

0 commit comments

Comments
 (0)