summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-03-03 13:54:46 +0100
committerMontel Laurent <[email protected]>2015-03-03 13:54:46 +0100
commitc78318558487f44a1f9c96e9479e9fc0a10fe795 (patch)
tree9e113757e0e2afe047ddd8128c5832cadc0fb741
parentb1d6ef0cbe37fe34e1739e915db52312eb170881 (diff)
Use new macro for use icon on Win/MacOsX. Use new KDE_ macro.
-rw-r--r--CMakeLists.txt15
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--icons/CMakeLists.txt2
-rw-r--r--libkcardgame/CMakeLists.txt4
-rw-r--r--mimetypes/CMakeLists.txt4
-rw-r--r--previews/CMakeLists.txt2
-rw-r--r--sounds/CMakeLists.txt2
-rw-r--r--themes/CMakeLists.txt4
8 files changed, 19 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9a268b..663dc00 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project( kpat )
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.2.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 Qml Quick QuickWidgets Svg Test)
@@ -31,6 +31,7 @@ find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(Phonon4Qt5)
include(FeatureSummary)
+include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
@@ -94,15 +95,17 @@ set( kpat_SRCS
ki18n_wrap_ui( kpat_SRCS statisticsdialog.ui )
kconfig_add_kcfg_files( kpat_SRCS settings.kcfgc )
-#kde4_add_app_icon( kpat_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-app-kpat.png" )
+
+file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi*-apps-kpat.png")
+ecm_add_app_icon(kpat_SRCS ICONS ${ICONS_SRCS})
add_executable( kpat ${kpat_SRCS} )
target_link_libraries( kpat kcardgame KF5KDEGames KF5::KIOCore Phonon::phonon4qt5 KF5::I18n KF5::KDELibs4Support)
-install( TARGETS kpat ${INSTALL_TARGETS_DEFAULT_ARGS} )
+install( TARGETS kpat ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
-install( PROGRAMS org.kde.kpat.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
-install( FILES kpatui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kpat )
-install( FILES kpat.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
+install( PROGRAMS org.kde.kpat.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
+install( FILES kpatui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kpat )
+install( FILES kpat.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 65fa3f0..179a32c 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -2,4 +2,4 @@
#
#
-kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kpat)
+kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kpat)
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index e3778df..728c85e 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,2 +1,2 @@
-ecm_install_icons(ICONS hi128-apps-kpat.png hi16-apps-kpat.png hi22-apps-kpat.png hi24-apps-kpat.png hi256-apps-kpat.png hi32-apps-kpat.png hi48-apps-kpat.png hi64-apps-kpats.png DESTINATION ${ICON_INSTALL_DIR} )
+ecm_install_icons(ICONS hi128-apps-kpat.png hi16-apps-kpat.png hi22-apps-kpat.png hi24-apps-kpat.png hi256-apps-kpat.png hi32-apps-kpat.png hi48-apps-kpat.png hi64-apps-kpats.png DESTINATION ${KDE_INSTALL_ICONDIR} )
diff --git a/libkcardgame/CMakeLists.txt b/libkcardgame/CMakeLists.txt
index 0590638..24e3583 100644
--- a/libkcardgame/CMakeLists.txt
+++ b/libkcardgame/CMakeLists.txt
@@ -12,5 +12,5 @@ add_library( kcardgame SHARED ${libkcardgame_SRCS} )
generate_export_header(kcardgame BASE_NAME libkcardgame)
target_link_libraries( kcardgame KF5KDEGames KF5::NewStuff KF5::GuiAddons Qt5::Svg KF5::Completion)
-install( TARGETS kcardgame ${INSTALL_TARGETS_DEFAULT_ARGS} )
-install( FILES kcardtheme.knsrc DESTINATION ${CONFIG_INSTALL_DIR} )
+install( TARGETS kcardgame ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
+install( FILES kcardtheme.knsrc DESTINATION ${KDE_INSTALL_CONFDIR} )
diff --git a/mimetypes/CMakeLists.txt b/mimetypes/CMakeLists.txt
index 02d9b8c..28462b9 100644
--- a/mimetypes/CMakeLists.txt
+++ b/mimetypes/CMakeLists.txt
@@ -1,4 +1,4 @@
find_package( SharedMimeInfo REQUIRED )
-install( FILES kpatience.xml DESTINATION ${XDG_MIME_INSTALL_DIR} )
-update_xdg_mimetypes( ${XDG_MIME_INSTALL_DIR} )
+install( FILES kpatience.xml DESTINATION ${KDE_INSTALL_MIMEDIR} )
+update_xdg_mimetypes( ${KDE_INSTALL_MIMEDIR} )
diff --git a/previews/CMakeLists.txt b/previews/CMakeLists.txt
index a0960e7..19971fc 100644
--- a/previews/CMakeLists.txt
+++ b/previews/CMakeLists.txt
@@ -13,4 +13,4 @@ set( kpat_previews
18.png
)
-install( FILES ${kpat_previews} DESTINATION ${DATA_INSTALL_DIR}/kpat/previews )
+install( FILES ${kpat_previews} DESTINATION ${KDE_INSTALL_DATADIR}/kpat/previews )
diff --git a/sounds/CMakeLists.txt b/sounds/CMakeLists.txt
index 19067b2..0dfda16 100644
--- a/sounds/CMakeLists.txt
+++ b/sounds/CMakeLists.txt
@@ -3,4 +3,4 @@ set( kpat_sounds
card-down.ogg
)
-install( FILES ${kpat_sounds} DESTINATION ${DATA_INSTALL_DIR}/kpat/sounds )
+install( FILES ${kpat_sounds} DESTINATION ${KDE_INSTALL_DATADIR}/kpat/sounds )
diff --git a/themes/CMakeLists.txt b/themes/CMakeLists.txt
index 7504e19..bc3ccc0 100644
--- a/themes/CMakeLists.txt
+++ b/themes/CMakeLists.txt
@@ -16,7 +16,7 @@ set( kpat_themes
oldertheme.png
)
-install( FILES ${kpat_themes} DESTINATION ${DATA_INSTALL_DIR}/kpat/themes )
+install( FILES ${kpat_themes} DESTINATION ${KDE_INSTALL_DATADIR}/kpat/themes )
-install( FILES kpat.knsrc DESTINATION ${CONFIG_INSTALL_DIR} )
+install( FILES kpat.knsrc DESTINATION ${KDE_INSTALL_CONFDIR} )