Skip to content

Commit 7f43c43

Browse files
EriczklmGin890
authored andcommitted
Linked SerialPrograms Icon on MacOS
1 parent a1a37f1 commit 7f43c43

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

IconResource/icon.icns

44.8 KB
Binary file not shown.

SerialPrograms/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}../../ FILES ${MAIN_SOURCES})
20342034

20352035
if (APPLE)
20362036
# TODO: set up the correct application icon
2037-
# set(SerialPrograms_ICON ${CMAKE_CURRENT_SOURCE_DIR}/../Resources/icon.icns)
2037+
set(SerialPrograms_ICON ${CMAKE_CURRENT_SOURCE_DIR}/../IconResource/icon.icns)
20382038
# set_source_files_properties(SerialPrograms_ICON PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
20392039

20402040
# Links on how to create a MacOS app bundle with cmake
@@ -2047,9 +2047,10 @@ if (APPLE)
20472047
MACOSX_BUNDLE_BUNDLE_NAME SerialPrograms
20482048
MACOSX_BUNDLE_BUNDLE_VERSION "0.1"
20492049
MACOSX_BUNDLE_SHORT_VERSION_STRING "0.1"
2050-
# MACOSX_BUNDLE_ICON_FILE icon
2050+
MACOSX_BUNDLE_ICON_FILE "icon.icns"
20512051
# MacOSXBundleInfo.plist.in is modified from https://github.com/Kitware/CMake/blob/master/Modules/MacOSXBundleInfo.plist.in
20522052
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/MacOSXBundleInfo.plist.in
2053+
RESOURCE ${SerialPrograms_ICON}
20532054
)
20542055
else() # WIN and Linux:
20552056
add_executable(SerialPrograms WIN32 ${MAIN_SOURCES})

0 commit comments

Comments
 (0)