Commit 13c86a26 authored by Laurent Montel's avatar Laurent Montel 😁

USe new KDE_ macro

parent b54c5aa0
......@@ -3,7 +3,7 @@ project(palapeli)
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 Concurrent Svg)
......@@ -27,6 +27,7 @@ find_package(KF5 REQUIRED COMPONENTS
find_package(KF5KDEGames 4.9.0 REQUIRED)
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
......
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR palapeli)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR palapeli)
......@@ -35,9 +35,9 @@ set_target_properties(pala PROPERTIES
DEFINE_SYMBOL MAKE_LIBPALA
)
install(TARGETS pala EXPORT pala-targets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(EXPORT pala-targets DESTINATION ${LIB_INSTALL_DIR}/libpala)
install(FILES libpala-config.cmake DESTINATION ${LIB_INSTALL_DIR}/libpala)
install(FILES ${libpala_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/libpala COMPONENT Devel)
install(FILES ${libpala_FANCY_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/Pala COMPONENT Devel)
install(FILES libpala-slicerplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
install(TARGETS pala EXPORT pala-targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(EXPORT pala-targets DESTINATION ${KDE_INSTALL_LIBDIR}/libpala)
install(FILES libpala-config.cmake DESTINATION ${KDE_INSTALL_LIBDIR}/libpala)
install(FILES ${libpala_HDRS} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/libpala COMPONENT Devel)
install(FILES ${libpala_FANCY_HDRS} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/Pala COMPONENT Devel)
install(FILES libpala-slicerplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR})
......@@ -2,15 +2,15 @@
set(SHARED_MIME_INFO_MINIMUM_VERSION "0.23")
find_package(SharedMimeInfo REQUIRED)
install(FILES palapeli-mimetypes.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})
install(FILES palapeli-mimetypes.xml DESTINATION ${KDE_INSTALL_MIMEDIR})
update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
# servicemenu integration
install(FILES palapeli_servicemenu.desktop DESTINATION ${SERVICES_INSTALL_DIR}/ServiceMenus)
install(FILES palapeli_servicemenu.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}/ServiceMenus)
# thumbnail creator plugin
add_library(palathumbcreator MODULE thumbnail-creator.cpp)
target_link_libraries(palathumbcreator KF5::KIOCore KF5::KIOWidgets KF5::Archive KF5::KDELibs4Support)
install(TARGETS palathumbcreator DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES palathumbcreator.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(TARGETS palathumbcreator DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES palathumbcreator.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
ecm_install_icons(ICONS
hi128-apps-palapeli.png hi16-apps-palapeli.png hi24-apps-palapeli.png hi32-apps-palapeli.png hi48-apps-palapeli.png hi64-apps-palapeli.png
hi128-mime-application-x-palapeli.png hi16-mime-application-x-palapeli.png hi24-mime-application-x-palapeli.png hi32-mime-application-x-palapeli.png hi48-mime-application-x-palapeli.png hi64-mime-application-x-palapeli.png
DESTINATION ${ICON_INSTALL_DIR} )
DESTINATION ${KDE_INSTALL_ICONDIR} )
......@@ -9,9 +9,9 @@ install(FILES
european-honey-bee.jpg
panther-chameleon-female.desktop
panther-chameleon-female.jpg
DESTINATION ${DATA_INSTALL_DIR}/palapeli/collection)
DESTINATION ${KDE_INSTALL_DATADIR}/palapeli/collection)
install(FILES
default-collection.conf
DESTINATION ${CONFIG_INSTALL_DIR}
DESTINATION ${KDE_INSTALL_CONFDIR}
RENAME palapeli-collectionrc)
......@@ -49,9 +49,9 @@ install(TARGETS
palapeli_goldbergslicer
palapeli_rectslicer
palapeli_jigsawslicer
DESTINATION ${PLUGIN_INSTALL_DIR})
DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES
palapeli_goldbergslicer.desktop
palapeli_rectslicer.desktop
palapeli_jigsawslicer.desktop
DESTINATION ${SERVICES_INSTALL_DIR})
DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......@@ -46,18 +46,19 @@ set(palapeli_SRCS
)
kconfig_add_kcfg_files(palapeli_SRCS settings.kcfgc)
ki18n_wrap_ui(palapeli_SRCS settings.ui)
kde4_add_app_icon(palapeli_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pics/hi*-app-palapeli.png")
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pics/hi*-apps-palapeli.png")
ecm_add_app_icon(palapeli_SRCS ICONS ${ICONS_SRCS})
add_executable(palapeli ${palapeli_SRCS})
target_link_libraries(palapeli pala KF5::KDELibs4Support KF5::Archive Qt5::Concurrent Qt5::Svg)
install(TARGETS palapeli ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS palapeli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES palapeliui.rc
DESTINATION ${KXMLGUI_INSTALL_DIR}/palapeli)
DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/palapeli)
install(FILES palapeli.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
install(FILES palapeli.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR})
install(FILES palapeli.kcfg
DESTINATION ${DATA_INSTALL_DIR}/palapeli)
install(PROGRAMS org.kde.palapeli.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
DESTINATION ${KDE_INSTALL_DATADIR}/palapeli)
install(PROGRAMS org.kde.palapeli.desktop DESTINATION ${KDE_INSTALL_APPDIR})
add_subdirectory(pics)
......@@ -5,4 +5,4 @@ install(FILES
mahogany-handjob-1.jpg
Rear-Admiral-Diplomat-1.jpg
Time-For-Lunch-2.jpg
DESTINATION ${DATA_INSTALL_DIR}/palapeli/backgrounds)
DESTINATION ${KDE_INSTALL_DATADIR}/palapeli/backgrounds)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment