Skip to content

Commit

Permalink
Add icon for the OSX bundled application
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
Paul Cercueil committed Feb 7, 2017
1 parent e0c3273 commit 19a55e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ if (ENABLE_APPLICATION_BUNDLE)
file(WRITE ${QT_CONF} "")
set_source_files_properties(${QT_CONF} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

set(ICON_FILE ${CMAKE_SOURCE_DIR}/resources/Scopy.icns)
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

set(CMAKE_EXE_LINKER_FLAGS "-Wl,-headerpad_max_install_names -Wl,-search_paths_first ${CMAKE_EXE_LINKER_FLAGS}")

foreach(plugin ${Qt5Gui_PLUGINS} ${Qt5Svg_PLUGINS})
Expand Down Expand Up @@ -191,7 +194,7 @@ if (ENABLE_APPLICATION_BUNDLE)
)

set(OSX_BUNDLE MACOSX_BUNDLE)
set(EXTRA_BUNDLE_FILES ${QT_PLUGINS} ${PKGINFO} ${QT_CONF} ${DECODERS})
set(EXTRA_BUNDLE_FILES ${QT_PLUGINS} ${ICON_FILE} ${PKGINFO} ${QT_CONF} ${DECODERS})
endif()

add_executable(${PROJECT_NAME} WIN32 ${OSX_BUNDLE}
Expand Down
4 changes: 2 additions & 2 deletions Info.plist.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<string>Scopy</string>
<key>CFBundleGetInfoString</key>
<string>@VERSION@, Copyright 2016 Analog Devices Inc.</string>
<!-- <key>CFBundleIconFile</key>
<string>Scopy.icns</string> -->
<key>CFBundleIconFile</key>
<string>Scopy.icns</string>
<key>CFBundleIdentifier</key>
<string>org.adi.Scopy</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand Down
Binary file added resources/Scopy.icns
Binary file not shown.

0 comments on commit 19a55e0

Please sign in to comment.