summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-03-03 13:35:00 +0100
committerMontel Laurent <[email protected]>2015-03-03 13:35:00 +0100
commit8310608c514499b4729b6ebf1e8c7672e8905d89 (patch)
tree3348dc0c753cb335ebf49574b4103b00d6d0a7f6
parent29e11416272e261bf7d9657f2340a6d1f579c436 (diff)
Use new macro for use icon on Win/MacOsX. Use new KDE_ macro.
-rw-r--r--CMakeLists.txt3
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--icons/CMakeLists.txt2
-rw-r--r--images/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt10
5 files changed, 10 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48d7f83..9df612d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project(kiriki)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
-find_package(ECM 1.3.0 REQUIRED CONFIG)
+find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
@@ -21,6 +21,7 @@ find_package(KF5 REQUIRED COMPONENTS
find_package(KF5KDEGames 4.9.0 REQUIRED)
include(FeatureSummary)
+include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 4392709..f995494 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,2 +1,2 @@
-kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kiriki)
+kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kiriki)
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index af741dc..0de008f 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,2 +1,2 @@
-ecm_install_icons( ICONS hi128-apps-kiriki.png hi16-apps-kiriki.png hi22-apps-kiriki.png hi32-apps-kiriki.png hi48-apps-kiriki.png hi64-apps-kiriki.png DESTINATION ${ICON_INSTALL_DIR} )
+ecm_install_icons( ICONS hi128-apps-kiriki.png hi16-apps-kiriki.png hi22-apps-kiriki.png hi32-apps-kiriki.png hi48-apps-kiriki.png hi64-apps-kiriki.png DESTINATION ${KDE_INSTALL_ICONDIR} )
diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt
index 666e183..94b5627 100644
--- a/images/CMakeLists.txt
+++ b/images/CMakeLists.txt
@@ -5,6 +5,6 @@ install(FILES
dice-4.png
dice-5.png
dice-6.png
- dice-none.png DESTINATION ${DATA_INSTALL_DIR}/kiriki/images
+ dice-none.png DESTINATION ${KDE_INSTALL_DATADIR}/kiriki/images
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3c0d8cc..281dc47 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -17,17 +17,17 @@ ki18n_wrap_ui(kiriki_SRCS configPage.ui)
kconfig_add_kcfg_files(kiriki_SRCS settings.kcfgc)
-#Port it
-#kde4_add_app_icon(kiriki_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-apps-kiriki.png")
+file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-apps-kiriki.png")
+ecm_add_app_icon(kiriki_SRCS ICONS ${ICONS_SRCS})
add_executable(kiriki ${kiriki_SRCS})
target_link_libraries(kiriki KF5KDEGames KF5::XmlGui KF5::I18n KF5::IconThemes KF5::DBusAddons)
-install(TARGETS kiriki ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS kiriki ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
-install(FILES kirikiui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kiriki )
-install(PROGRAMS org.kde.kiriki.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+install(FILES kirikiui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kiriki )
+install(PROGRAMS org.kde.kiriki.desktop DESTINATION ${KDE_INSTALL_APPDIR} )