Commit 1bc573fe authored by Michael Reeves's avatar Michael Reeves

Fix CMake scoping issue

ecm_add_app_icon must be in the same scope as the corrisponding add_executable
parent 8136f38c
......@@ -50,6 +50,8 @@ set(kdiff3_SRCS
${kdiff3part_PART_SRCS}
)
#cann't use add_subdirectory because it changes the scope.
include(icons/CMakeLists.txt)
add_executable(kdiff3 ${kdiff3_SRCS})
target_link_libraries(kdiff3 KF5::ConfigCore KF5::ConfigGui KF5::Parts KF5::Crash ${KDiff3_LIBRARIES} )
......@@ -67,4 +69,3 @@ install( FILES kdiff3_shell.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kdiff3 )
install( PROGRAMS org.kde.kdiff3.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES org.kde.kdiff3.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
add_subdirectory(icons)
set(KDIFF3_PNG_ICONS
icons/16-apps-kdiff3.png
icons/22-apps-kdiff3.png
icons/32-apps-kdiff3.png
icons/48-apps-kdiff3.png
icons/64-apps-kdiff3.png
icons/128-apps-kdiff3.png
icons/256-apps-kdiff3.png)
set(KDIFF3_ICONS
16-apps-kdiff3.png
22-apps-kdiff3.png
32-apps-kdiff3.png
48-apps-kdiff3.png
64-apps-kdiff3.png
128-apps-kdiff3.png
256-apps-kdiff3.png
sc-apps-kdiff3.svgz
${KDIFF3_PNG_ICONS}
icons/sc-apps-kdiff3.svgz
)
# add icons to application sources, to have them bundled
# add icons to application sources, to have them bundled -- must be in same scope as src/CMakeLists.txt
ecm_add_app_icon(kdiff3_SRCS ICONS ${KDIFF3_ICONS})
ecm_install_icons(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment