Browse Source

Merge topic 'cmake-gui-macos-icon' into release-3.19

efe48189bf cmake-gui: Restore application icon on macOS

Acked-by: Kitware Robot <[email protected]>
Acked-by: Kyle Edwards <[email protected]>
Merge-request: !5361
Brad King 5 years ago
parent
commit
f04bad9091
1 changed files with 6 additions and 6 deletions
  1. 6 6
      Source/QtDialog/CMakeLists.txt

+ 6 - 6
Source/QtDialog/CMakeLists.txt

@@ -144,12 +144,6 @@ endif ()
 if(WIN32)
   list(APPEND SRCS CMakeSetup.rc)
 endif()
-if(APPLE)
-  list(APPEND SRCS CMakeSetup.icns)
-  set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
-  set_source_files_properties(CMakeSetup.icns PROPERTIES
-    MACOSX_PACKAGE_LOCATION Resources)
-endif()
 
 if(USE_LGPL)
   install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt
@@ -174,6 +168,12 @@ target_link_libraries(cmake-gui CMakeGUIMainLib Qt5::Core)
 if(WIN32)
   target_sources(CMakeGUILib INTERFACE $<TARGET_OBJECTS:CMakeVersion>)
 endif()
+if(APPLE)
+  target_sources(CMakeGUILib INTERFACE CMakeSetup.icns)
+  set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
+  set_source_files_properties(CMakeSetup.icns PROPERTIES
+    MACOSX_PACKAGE_LOCATION Resources)
+endif()
 
 if(CMake_JOB_POOL_LINK_BIN)
   set_property(TARGET cmake-gui PROPERTY JOB_POOL_LINK "link-bin")