cmake-gui: Attach icons only to main GUI executables

In commit efe48189bf (cmake-gui: Restore application icon on macOS,
2020-10-13, v3.19.0-rc1~2^2) and commit f7ae4f572b (cmake-gui: Restore
application icon on Windows, 2020-10-13, v3.19.0-rc1~1^2) we attached
the icon source files to all consumers of `CMakeGUILib`, but that
includes other libraries like `CMakeGUIMainLib`.  The latter library is
meant only for direct consumption by a GUI executable, so use that to
propagate the icons instead.
This commit is contained in:
Brad King
2020-10-14 09:33:34 -04:00
parent 0b0df2d063
commit 440ee739c4

View File

@@ -162,10 +162,10 @@ add_executable(cmake-gui WIN32 MACOSX_BUNDLE CMakeGUIExec.cxx ${MANIFEST_FILE})
target_link_libraries(cmake-gui CMakeGUIMainLib Qt5::Core)
if(WIN32)
target_sources(CMakeGUILib INTERFACE $<TARGET_OBJECTS:CMakeVersion> CMakeSetup.rc)
target_sources(CMakeGUIMainLib INTERFACE $<TARGET_OBJECTS:CMakeVersion> CMakeSetup.rc)
endif()
if(APPLE)
target_sources(CMakeGUILib INTERFACE CMakeSetup.icns)
target_sources(CMakeGUIMainLib INTERFACE CMakeSetup.icns)
set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
set_source_files_properties(CMakeSetup.icns PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)