diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ # https://github.com/KDE/partitionmanager/blob/master/CMakeLists.txt http://commits.kde.org/kimtoy/1e62777affb0e072f3462e80bc271f3cba661104 set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" FORCE) -find_package(ECM 1.1.0 REQUIRED NO_MODULE) +find_package(ECM 1.7.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMOptionalAddSubdirectory) @@ -29,6 +29,7 @@ include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) +include(ECMAddAppIcon) find_package(Qt5 5.5 CONFIG REQUIRED Concurrent diff --git a/krusader/CMakeLists.txt b/krusader/CMakeLists.txt --- a/krusader/CMakeLists.txt +++ b/krusader/CMakeLists.txt @@ -42,8 +42,8 @@ krdebuglogger.cpp ) -# TODO porting: missing kf5 equivalent -#kde4_add_app_icon(krusader_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-krusader_user.png") +file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-krusader_user.png") +ecm_add_app_icon(krusader_SRCS ICONS ${ICONS_SRCS}) qt5_add_resources(krusader_RC_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/resources.qrc" ) diff --git a/porting_todo.txt b/porting_todo.txt --- a/porting_todo.txt +++ b/porting_todo.txt @@ -5,8 +5,7 @@ 1 - rewrite CMakeLists rules / variables -all rules were rewritten in a Qt5/KF5 way, still'kde4_add_app_icon' is missing, -I think we should find another way; I didn't changed yet the variables in +all rules were rewritten in a Qt5/KF5 way; I didn't changed yet the variables in 'target_link_libraries', just commented out; btw, with a fast 'cmake', all flags should be generated (flags.make files)