Skip to content

Commit b1b77a3

Browse files
committed
Keep QGIS Browser alias on Mac from duplicating
1 parent 539b7cb commit b1b77a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

images/icons/mac/browser/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
FILE (GLOB ICONS *.icns)
33
INSTALL (FILES ${ICONS}
44
DESTINATION "${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/QGIS Browser.app/Contents/Resources")
5-
# create alias now, so alias file gets correct icon
5+
# create alias now, so alias file gets correct icon, delete first if it exists
6+
SET (BROWSER_ALIAS "$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}/QGIS Browser.app")
7+
IF (EXISTS ${BROWSER_ALIAS})
8+
FILE (REMOVE ${BROWSER_ALIAS})
9+
ENDIF ()
610
INSTALL (CODE "EXECUTE_PROCESS(COMMAND osascript -e \"tell application \\\"Finder\\\" to make alias file to POSIX file \\\"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${QGIS_BIN_DIR}/QGIS Browser.app\\\" at POSIX file \\\"$ENV{DESTDIR}${QGIS_INSTALL_PREFIX}/\\\"\")")

0 commit comments

Comments
 (0)