From e87650f65388ab0cb1a7709062a5bda311b3df0c Mon Sep 17 00:00:00 2001 From: Eidolon Date: Thu, 14 Jul 2022 23:57:53 -0500 Subject: [PATCH] cmake: Set plist properties for macOS bundle yay icon --- src/sdl/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 0f2a29cf..73871c92 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -152,6 +152,16 @@ if(${SDL2_FOUND}) ${CORE_FOUNDATION_LIBRARY} ) set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") + + # Configure the app bundle icon and plist properties + target_sources(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns") + set_target_properties(SRB2SDL2 PROPERTIES + MACOSX_BUNDLE_ICON_FILE "Srb2mac" + MACOSX_BUNDLE_BUNDLE_NAME "Sonic Robo Blast 2" + MACOSX_BUNDLE_BUNDLE_VERSION ${SRB2_VERSION} + + RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/macosx/Srb2mac.icns" + ) endif() target_link_libraries(SRB2SDL2 PRIVATE