From efe48189bfced062165feedec15a1d7be1306eb4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 13 Oct 2020 10:35:14 -0400 Subject: cmake-gui: Restore application icon on macOS In commit 41e223deb3 (CMake GUI: Split up into libraries, add test shim, 2020-09-14) the macOS icon source file was moved to CMakeGUILib, but it needs to be directly in the main application in order to be attached to the `.app` in the right place. --- Source/QtDialog/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 394762a..d6ae03b 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/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 $) 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") -- cgit v0.12