File fix-icons.diff of Package kjots
From 71673cd981ceba831818151346270c178bcbcafa Mon Sep 17 00:00:00 2001
From: Raymond Wooninck <tittiatcoke@gmail.com>
Date: Sat, 10 Sep 2016 11:03:56 +0200
Subject: Fix build with newer Frameworks and port kde4_add_app_icon to
ecm_add_app_icon
CCMAIL: dvratil@kde.org
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d1dcb85..7541ccd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ include(KDECMakeSettings)
include(KDECompilerSettings)
include(ECMInstallIcons)
include(ECMQtDeclareLoggingCategory)
+include(ECMAddAppIcon)
set(KJOTS_VERSION "5.0.1")
@@ -23,6 +24,10 @@ set(KMIME_LIB_VERSION "4.87.0")
set(PIMTEXTEDIT_LIB_VERSION "4.91.0")
set(KONTACTINTERFACE_LIB_VERSION "4.82.0")
+#Qt Packages
+set(QT_REQUIRED_VERSION "5.6.0")
+find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus PrintSupport)
+
# KF5 Packages
find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b1e8bcf..e10fcb8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -81,8 +81,9 @@ set(kjots_SRCS
main.cpp
KJotsMain.cpp
)
-kde4_add_app_icon(kjots_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-apps-kjots.png")
-# TODO: ECM_ADD_APP_ICON?
+
+file(GLOB ICONS_SRCS "${CMAKE_SOURCE_DIR}/icons/*-apps-kjots.png")
+ecm_add_app_icon(kjots_SRCS ICONS ${ICONS_SRCS})
add_executable(kjots ${kjots_SRCS})