@@ -343,7 +343,6 @@ else()
343
343
Source /main.cpp
344
344
Packaging/windows/devilutionx.exe.manifest
345
345
Packaging/windows/devilutionx.rc
346
- Packaging/apple /AppIcon.icns
347
346
Packaging/apple /LaunchScreen.storyboard)
348
347
349
348
if (CMAKE_STRIP AND NOT DEVILUTIONX_DISABLE_STRIP)
@@ -382,7 +381,6 @@ include(functions/set_relative_file_macro)
382
381
set_relative_file_macro(${BIN_TARGET} )
383
382
384
383
if (APPLE )
385
- set_source_files_properties ("./Packaging/apple/AppIcon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
386
384
set (MACOSX_BUNDLE_GUI_IDENTIFIER com.diasurgical.devilutionx)
387
385
set (MACOSX_BUNDLE_COPYRIGHT Unlicense)
388
386
set (MACOSX_BUNDLE_BUNDLE_NAME devilutionx)
@@ -399,7 +397,15 @@ if(APPLE)
399
397
set (MACOSX_BUNDLE_REQUIRED_PLATFORM Carbon)
400
398
set (CMAKE_OSX_DEPLOYMENT_TARGET "10.12.0" )
401
399
endif ()
402
- set_target_properties (${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_ICON_FILE "AppIcon.icns" )
400
+ if (DARWIN_MAJOR_VERSION VERSION_LESS 9)
401
+ # Finder on OSX Tiger can only handle icns files with up to 128x128 icons.
402
+ set (_icon_file AppIcon_128)
403
+ else ()
404
+ set (_icon_file AppIcon)
405
+ endif ()
406
+ target_sources (${BIN_TARGET} PRIVATE "Packaging/apple/${_icon_file} .icns" )
407
+ set_source_files_properties ("./Packaging/apple/${_icon_file} .icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
408
+ set_target_properties (${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${_icon_file} .icns" )
403
409
set_target_properties (${BIN_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR} /Packaging/apple/Info.plist" )
404
410
405
411
install (TARGETS ${BIN_TARGET} DESTINATION ./)
0 commit comments