summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-03-03 23:11:22 +0100
committerJakob Gruber <[email protected]>2015-07-15 11:23:56 +0200
commitc6227bc863ab909aee9b569a0be84788839f9071 (patch)
treefc4076253a07346b50ed545d8a26f0bae9318e0c
parent5d7d4d8efb23fdbffb14ef1f0d64a9b431fc8f59 (diff)
use new KDE_ macro
-rw-r--r--CMakeLists.txt7
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--icons/CMakeLists.txt2
-rw-r--r--levels/CMakeLists.txt4
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--themes/CMakeLists.txt2
6 files changed, 14 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9f0781..619ead1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ if (NOT CMAKE_BUILD_TYPE)
endif ()
-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 5.2.0 CONFIG REQUIRED Core Widgets Svg Quick QuickWidgets Test)
@@ -26,6 +26,7 @@ include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
include(FeatureSummary)
+include(ECMAddAppIcon)
include(ECMInstallIcons)
include(ECMAddTests)
@@ -37,9 +38,9 @@ add_subdirectory(levels)
add_subdirectory(src)
add_subdirectory(test)
-install(FILES ${CMAKE_SOURCE_DIR}/org.kde.picmi.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(FILES ${CMAKE_SOURCE_DIR}/org.kde.picmi.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES ${CMAKE_SOURCE_DIR}/picmi.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata )
-install(FILES ${CMAKE_SOURCE_DIR}/picmiui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/picmi)
+install(FILES ${CMAKE_SOURCE_DIR}/picmiui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/picmi)
# vim:set ts=4 sw=4 et:
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 2c69533..c3cdc84 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,3 +1,3 @@
-kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR picmi)
+kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR picmi)
# vim:set ts=4 sw=4 et:
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index 9054dde..9f7a232 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,3 +1,3 @@
-ecm_install_icons(ICONS 128-apps-picmi.png 16-apps-picmi.png 22-apps-picmi.png 256-apps-picmi.png 32-apps-picmi.png 48-apps-picmi.png 64-apps-picmi.png DESTINATION ${ICON_INSTALL_DIR})
+ecm_install_icons(ICONS 128-apps-picmi.png 16-apps-picmi.png 22-apps-picmi.png 256-apps-picmi.png 32-apps-picmi.png 48-apps-picmi.png 64-apps-picmi.png DESTINATION ${KDE_INSTALL_ICONDIR})
# vim:set ts=4 sw=4 et:
diff --git a/levels/CMakeLists.txt b/levels/CMakeLists.txt
index babf21a..0c8a66f 100644
--- a/levels/CMakeLists.txt
+++ b/levels/CMakeLists.txt
@@ -4,7 +4,7 @@ set(picmi_LEVELS
file(GLOB picmi_LEVELS_DATA "${CMAKE_CURRENT_SOURCE_DIR}/default/*.xpm")
-install(FILES ${picmi_LEVELS} DESTINATION ${DATA_INSTALL_DIR}/picmi/levels)
-install(FILES ${picmi_LEVELS_DATA} DESTINATION ${DATA_INSTALL_DIR}/picmi/levels/default)
+install(FILES ${picmi_LEVELS} DESTINATION ${KDE_INSTALL_DATADIR}/picmi/levels)
+install(FILES ${picmi_LEVELS_DATA} DESTINATION ${KDE_INSTALL_DATADIR}/picmi/levels/default)
# vim:set ts=4 sw=4 et:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0f8f8bd..2010746 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,7 +2,7 @@ set(PICMI_VERSION_MAJOR 2)
set(PICMI_VERSION_MINOR 0)
set(PICMI_VERSION_PATCH 0)
if (NOT PICMI_FILEPATH)
- set(PICMI_FILEPATH ${DATA_INSTALL_DIR}/picmi/)
+ set(PICMI_FILEPATH ${KDE_INSTALL_DATADIR}/picmi/)
endif ()
add_definitions(${QT_DEFINITIONS} ${KDE_DEFINITIONS})
@@ -11,7 +11,7 @@ remove_definitions(-DQT_NO_STL)
# See http://www.cmake.org/pipermail/cmake/2008-June/022381.html
# and 2a38192c6daba in KDE SVN.
# TODO: KDE5 equivalent for KDE4_ENABLE_EXCEPTIONS.
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
+kde_enable_exceptions()
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions("-Wextra -pedantic")
@@ -40,8 +40,8 @@ set(picmi_SRCS
systemexception.cpp
)
-# TODO: KDE5 equivalent.
-# kde4_add_app_icon(picmi_SRCS "${CMAKE_SOURCE_DIR}/icons/hi*-apps-picmi.png")
+file(GLOB ICONS_SRCS "${CMAKE_SOURCE_DIR}/icons/*-apps-picmi.png")
+ecm_add_app_icon(picmi_SRCS ICONS ${ICONS_SRCS})
add_executable(picmi ${picmi_SRCS})
target_link_libraries(picmi
@@ -56,6 +56,6 @@ target_link_libraries(picmi
KF5::KDELibs4Support
)
-install(TARGETS picmi DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS picmi DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
# vim:set ts=4 sw=4 et:
diff --git a/themes/CMakeLists.txt b/themes/CMakeLists.txt
index 7faf531..ab57a46 100644
--- a/themes/CMakeLists.txt
+++ b/themes/CMakeLists.txt
@@ -3,6 +3,6 @@ set(picmi_THEME_SRCS
picmi.svg
picmi.png
)
-install(FILES ${picmi_THEME_SRCS} DESTINATION ${DATA_INSTALL_DIR}/picmi/themes)
+install(FILES ${picmi_THEME_SRCS} DESTINATION ${KDE_INSTALL_DATADIR}/picmi/themes)
# vim:set ts=4 sw=4 et: