summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-03-03 13:38:41 +0100
committerMontel Laurent <[email protected]>2015-03-03 13:38:55 +0100
commitaf48ca09987815a61b27f6ca534abb3dc189ea88 (patch)
tree91bcbb3950c9cb55384bd29516da21253abfef44
parentaf66d902db932262e8e69a2a2c0e6c302bf9143d (diff)
Use new macro for use icon on Win/MacOsX. Use new KDE_ macro.
-rw-r--r--CMakeLists.txt3
-rw-r--r--arenas/CMakeLists.txt2
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--pictures/CMakeLists.txt2
-rw-r--r--players/CMakeLists.txt2
-rw-r--r--sounds/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt11
-rw-r--r--themes/CMakeLists.txt2
8 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d65bae4..b30da1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project(granatier)
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)
@@ -29,6 +29,7 @@ include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
+include(ECMAddAppIcon)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DTRANSLATION_DOMAIN="granatier")
diff --git a/arenas/CMakeLists.txt b/arenas/CMakeLists.txt
index 2a22b29..1129eb2 100644
--- a/arenas/CMakeLists.txt
+++ b/arenas/CMakeLists.txt
@@ -1,3 +1,3 @@
FILE(GLOB arenaFiles *.desktop *.xml)
install(FILES ${arenaFiles}
- DESTINATION ${DATA_INSTALL_DIR}/granatier/arenas)
+ DESTINATION ${KDE_INSTALL_DATADIR}/granatier/arenas)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 9fde7bd..f7648d1 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1 +1 @@
-kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR granatier)
+kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR granatier)
diff --git a/pictures/CMakeLists.txt b/pictures/CMakeLists.txt
index 73816e3..380a066 100644
--- a/pictures/CMakeLists.txt
+++ b/pictures/CMakeLists.txt
@@ -1,2 +1,2 @@
-ecm_install_icons(ICONS hi128-apps-granatier.png hi16-apps-granatier.png hi22-apps-granatier.png hi32-apps-granatier.png hi48-apps-granatier.png hi64-apps-granatier.png DESTINATION ${ICON_INSTALL_DIR})
+ecm_install_icons(ICONS hi128-apps-granatier.png hi16-apps-granatier.png hi22-apps-granatier.png hi32-apps-granatier.png hi48-apps-granatier.png hi64-apps-granatier.png DESTINATION ${KDE_INSTALL_ICONDIR})
diff --git a/players/CMakeLists.txt b/players/CMakeLists.txt
index 820aa03..3a9535b 100644
--- a/players/CMakeLists.txt
+++ b/players/CMakeLists.txt
@@ -4,4 +4,4 @@ install(FILES player1.desktop player1.svgz
player3.desktop player3.svgz
player4.desktop player4.svgz
player5.desktop player5.svgz
- DESTINATION ${DATA_INSTALL_DIR}/granatier/players)
+ DESTINATION ${KDE_INSTALL_DATADIR}/granatier/players)
diff --git a/sounds/CMakeLists.txt b/sounds/CMakeLists.txt
index 9707262..d5e9a2f 100644
--- a/sounds/CMakeLists.txt
+++ b/sounds/CMakeLists.txt
@@ -1,3 +1,3 @@
FILE(GLOB wavfiles *.wav)
install(FILES ${wavfiles}
- DESTINATION ${DATA_INSTALL_DIR}/granatier/sounds)
+ DESTINATION ${KDE_INSTALL_DATADIR}/granatier/sounds)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 08313b9..1f38f55 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,17 +41,18 @@ ki18n_wrap_ui(granatierSources config/arenaselector.ui config/generalsettings.ui
kconfig_add_kcfg_files(granatierSources config/settings.kcfgc)
-kde4_add_app_icon(granatierSources "${CMAKE_CURRENT_SOURCE_DIR}/../pictures/hi*-apps-granatier.png")
+file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pictures/hi*-apps-granatier.png")
+ecm_add_app_icon(granatierSources ICONS ${ICONS_SRCS})
add_executable(granatier ${granatierSources})
target_link_libraries(granatier Qt5::Xml Qt5::Widgets KF5::NewStuff KF5KDEGames Qt5::Svg KF5::DBusAddons)
-install(TARGETS granatier ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS granatier ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
-install(PROGRAMS org.kde.granatier.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(PROGRAMS org.kde.granatier.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES granatier.appdata.xml DESTINATION share/appdata)
-install(FILES config/granatier.kcfg DESTINATION ${KCFG_INSTALL_DIR})
-install(FILES ${granatierData} DESTINATION ${KXMLGUI_INSTALL_DIR}/granatier)
+install(FILES config/granatier.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
+install(FILES ${granatierData} DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/granatier)
diff --git a/themes/CMakeLists.txt b/themes/CMakeLists.txt
index b88fcdf..8017b63 100644
--- a/themes/CMakeLists.txt
+++ b/themes/CMakeLists.txt
@@ -2,4 +2,4 @@
install(FILES granatier.desktop granatier_preview.png granatier.svgz
clanbomber.desktop clanbomber_preview.png clanbomber.svgz
waterbomb.desktop waterbomb_preview.png waterbomb.svgz
- DESTINATION ${DATA_INSTALL_DIR}/granatier/themes)
+ DESTINATION ${KDE_INSTALL_DATADIR}/granatier/themes)