diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 012f7cc..ebdf0db 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,70 +1,71 @@ ########### kdiff3 KPart ############### find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Parts WidgetsAddons) set(kdiff3part_PART_SRCS kdiff3_part.cpp kdiff3.cpp directorymergewindow.cpp merger.cpp pdiff.cpp difftextwindow.cpp diff.cpp optiondialog.cpp mergeresultwindow.cpp fileaccess.cpp gnudiff_analyze.cpp gnudiff_io.cpp gnudiff_xmalloc.cpp common.cpp smalldialogs.cpp progress.cpp ProgressProxyExtender.cpp PixMapUtils.cpp MergeFileInfos.cpp Utils.cpp selection.cpp cvsignorelist.cpp SourceData.cpp Overview.cpp Logging.cpp FileNameLineEdit.cpp MergeEditLine.cpp ) add_library(kdiff3part MODULE ${kdiff3part_PART_SRCS}) set_target_properties(kdiff3part PROPERTIES DEFINE_SYMBOL KDIFF3_PART) target_compile_features(kdiff3part PRIVATE ${needed_features}) target_link_libraries(kdiff3part ${KDiff3_LIBRARIES} KF5::Parts KF5::Crash) target_compile_definitions(kdiff3part PRIVATE -DTRANSLATION_DOMAIN=\"kdiff3\") install(TARGETS kdiff3part DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/parts ) ########### kdiff3 executable ############### find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Parts WidgetsAddons Config) set(kdiff3_SRCS main.cpp kdiff3_shell.cpp ${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} ) target_compile_features(kdiff3 PRIVATE ${needed_features}) install(TARGETS kdiff3 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### install( FILES kdiff3part.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) install( FILES kdiff3_part.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kdiff3part ) install( FILES kdiff3_shell.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kdiff3 ) #install( PROGRAMS kdiff3.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) 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) diff --git a/src/icons/CMakeLists.txt b/src/icons/CMakeLists.txt index b16ee9a..aca9506 100644 --- a/src/icons/CMakeLists.txt +++ b/src/icons/CMakeLists.txt @@ -1,20 +1,23 @@ +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( ICONS ${KDIFF3_ICONS} DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor )