summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-30 20:17:40 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-30 20:22:09 (GMT)
commit01d583e719c247a43b71624c3f658d2656f949a6 (patch)
tree00d3d4facb559384fa8f4a0d62aaf811d3a2c380
parenta56db272b619a136e0193fb682b97a3e881bd65a (diff)
Let ECM not mess with normal install path, use KDE_INSTALL_DIRS_NO_DEPRECATED
-rw-r--r--CMakeLists.txt7
-rw-r--r--data/CMakeLists.txt21
-rw-r--r--doc/CMakeLists.txt12
-rw-r--r--src/apps/marble-kde/CMakeLists.txt53
-rw-r--r--src/bindings/CMakeLists.txt14
-rw-r--r--src/plasma/CMakeLists.txt18
-rw-r--r--src/plasma/qmlplugin/CMakeLists.txt4
-rw-r--r--src/plasmarunner/CMakeLists.txt26
-rw-r--r--src/plugins/runner/gpx/CMakeLists.txt30
-rw-r--r--src/plugins/runner/json/CMakeLists.txt32
-rw-r--r--src/plugins/runner/kml/CMakeLists.txt40
-rw-r--r--src/plugins/runner/osm/CMakeLists.txt30
-rw-r--r--src/plugins/runner/shp/CMakeLists.txt32
-rw-r--r--src/thumbnailer/CMakeLists.txt14
14 files changed, 202 insertions, 131 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6f20ae..e498a1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -271,6 +271,13 @@ if(WIN32)
endif(WIN32)
####################################################
+
+####################################################
+# Add global ECM & KF5 settings
+set(KDE_INSTALL_DIRS_NO_DEPRECATED TRUE)
+set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
+
+
####################################################
# Add the include directories
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 1cc2322..13989f4 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -273,16 +273,17 @@ DESTINATION ${MARBLE_DATA_INSTALL_PATH}/audio)
add_subdirectory(lang)
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET) # for FindSharedMimeInfo
+if(NOT ECM_FOUND)
+ return()
+endif()
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs) # for XDG_MIME_INSTALL_DIR
- # shared-mime-info 0.40 is mandatory for generic-icon
- set( SHARED_MIME_INFO_MINIMUM_VERSION "0.40" )
- find_package( SharedMimeInfo QUIET )
- IF( SharedMimeInfo_FOUND )
- install( FILES mimetypes/geo.xml DESTINATION ${XDG_MIME_INSTALL_DIR} )
- update_xdg_mimetypes( ${XDG_MIME_INSTALL_DIR} )
- ENDIF()
+include(KDEInstallDirs) # for KDE_INSTALL_MIMEDIR
+# shared-mime-info 0.40 is mandatory for generic-icon
+set( SHARED_MIME_INFO_MINIMUM_VERSION "0.40" )
+find_package( SharedMimeInfo QUIET )
+if(SharedMimeInfo_FOUND)
+ install(FILES mimetypes/geo.xml DESTINATION ${KDE_INSTALL_MIMEDIR})
+ update_xdg_mimetypes( ${KDE_INSTALL_MIMEDIR} )
endif()
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index c7969e9..7cfd10a 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,14 +1,16 @@
########### install files ###############
#
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS DocTools)
if(KF5_FOUND)
- kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR marble)
+ kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR marble)
endif()
diff --git a/src/apps/marble-kde/CMakeLists.txt b/src/apps/marble-kde/CMakeLists.txt
index 8f1efe5..75e58e6 100644
--- a/src/apps/marble-kde/CMakeLists.txt
+++ b/src/apps/marble-kde/CMakeLists.txt
@@ -1,15 +1,20 @@
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
- include(KDECMakeSettings)
- include(ECMInstallIcons)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+# KDECMakeSettings expexts LIB_INSTALL_DIR set
+set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR})
+include(KDECMakeSettings)
+include(ECMInstallIcons)
+
macro_optional_find_package(KF5 QUIET COMPONENTS Crash NewStuff Parts CoreAddons I18n)
-if (NOT KF5_FOUND)
- return()
+if(NOT KF5_FOUND)
+ return()
endif()
set(marble_kde_SRCS
@@ -32,23 +37,22 @@ target_link_libraries(marble_part
KF5::I18n
)
-install(TARGETS marble_part DESTINATION ${PLUGIN_INSTALL_DIR})
-install(FILES marble_part.desktop DESTINATION ${SERVICES_INSTALL_DIR})
-install(FILES marble_geo.desktop DESTINATION ${APPS_INSTALL_DIR})
-install(FILES marble_worldwind.desktop DESTINATION ${APPS_INSTALL_DIR})
-install(FILES marble_part.rc marbleui.rc marble.knsrc DESTINATION ${KXMLGUI_INSTALL_DIR}/marble)
+install(TARGETS marble_part DESTINATION ${KDE_INSTALL_PLUGINDIR})
+install(FILES marble_part.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+install(FILES marble_part.rc marbleui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/marble)
+install(FILES marble.knsrc DESTINATION ${KDE_INSTALL_CONFDIR})
ki18n_wrap_ui(marble_kde_SRCS ${marble_UI})
kconfig_add_kcfg_files(marble_kde_SRCS settings.kcfgc)
ecm_install_icons(ICONS
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/128-apps-marble.png"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/16-apps-marble.png"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/22-apps-marble.png"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/32-apps-marble.png"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/48-apps-marble.png"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/64-apps-marble.png"
- DESTINATION ${ICON_INSTALL_DIR})
+ "${CMAKE_SOURCE_DIR}/data/icons/128-apps-marble.png"
+ "${CMAKE_SOURCE_DIR}/data/icons/16-apps-marble.png"
+ "${CMAKE_SOURCE_DIR}/data/icons/22-apps-marble.png"
+ "${CMAKE_SOURCE_DIR}/data/icons/32-apps-marble.png"
+ "${CMAKE_SOURCE_DIR}/data/icons/48-apps-marble.png"
+ "${CMAKE_SOURCE_DIR}/data/icons/64-apps-marble.png"
+ DESTINATION ${KDE_INSTALL_ICONDIR})
add_executable (marble ${marble_kde_SRCS})
target_link_libraries (
@@ -69,7 +73,10 @@ if(STATIC_BUILD)
target_link_libraries(marble ${QT_PLUGINS_DIR}/imageformats/qsvg.lib)
endif(STATIC_BUILD)
-install(TARGETS marble ${INSTALL_TARGETS_DEFAULT_ARGS})
-install(PROGRAMS org.kde.marble.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(TARGETS marble ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+install(PROGRAMS org.kde.marble.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.kde.marble.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
-install(FILES marble.kcfg DESTINATION ${KCFG_INSTALL_DIR})
+install(FILES marble.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
+# register marble app as schemehandler
+install(FILES marble_geo.desktop DESTINATION ${KDE_INSTALL_APPDIR})
+install(FILES marble_worldwind.desktop DESTINATION ${KDE_INSTALL_APPDIR})
diff --git a/src/bindings/CMakeLists.txt b/src/bindings/CMakeLists.txt
index 7b0ab43..99708ea 100644
--- a/src/bindings/CMakeLists.txt
+++ b/src/bindings/CMakeLists.txt
@@ -3,16 +3,18 @@ if(EXPERIMENTAL_PYTHON_BINDINGS)
return()
endif()
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
-include(FeatureSummary)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS Wallet NewStuff Parts)
-if (NOT KF5_FOUND)
+if(NOT KF5_FOUND)
return()
endif()
diff --git a/src/plasma/CMakeLists.txt b/src/plasma/CMakeLists.txt
index 3645f38..a29db56 100644
--- a/src/plasma/CMakeLists.txt
+++ b/src/plasma/CMakeLists.txt
@@ -1,10 +1,18 @@
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
- include(KDECMakeSettings)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+# KDECMakeSettings expexts LIB_INSTALL_DIR set
+set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR})
+# Plasma macros assume SERVICES_INSTALL_DIR, DATA_INSTALL_DIR
+set(SERVICES_INSTALL_DIR ${KDE_INSTALL_KSERVICES5DIR})
+set(DATA_INSTALL_DIR ${KDE_INSTALL_DATADIR})
+include(KDECMakeSettings)
+
macro_optional_find_package(KF5 QUIET COMPONENTS Plasma)
if (NOT KF5_FOUND)
diff --git a/src/plasma/qmlplugin/CMakeLists.txt b/src/plasma/qmlplugin/CMakeLists.txt
index 8cb8a81..479dfc8 100644
--- a/src/plasma/qmlplugin/CMakeLists.txt
+++ b/src/plasma/qmlplugin/CMakeLists.txt
@@ -6,11 +6,11 @@ set(marblequick_SRCS
qmlplugin.cpp
)
-install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/marble/private/plasma)
+install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/marble/private/plasma)
add_library(marblequick SHARED ${marblequick_SRCS})
target_link_libraries(marblequick
marbledeclarative
)
-install(TARGETS marblequick DESTINATION ${QML_INSTALL_DIR}/org/kde/marble/private/plasma)
+install(TARGETS marblequick DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/marble/private/plasma)
diff --git a/src/plasmarunner/CMakeLists.txt b/src/plasmarunner/CMakeLists.txt
index 0abc3bb..23c19c4 100644
--- a/src/plasmarunner/CMakeLists.txt
+++ b/src/plasmarunner/CMakeLists.txt
@@ -1,20 +1,24 @@
project(MarblePlasmaRunner)
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(ECMPoQmTools)
- include(KDEInstallDirs)
- include(KDECMakeSettings)
+if(NOT ECM_FOUND)
+ return()
endif()
-include(FeatureSummary)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(ECMPoQmTools)
+include(KDEInstallDirs)
+# KDECMakeSettings expexts LIB_INSTALL_DIR set
+set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR})
+include(KDECMakeSettings)
+
macro_optional_find_package(KF5 QUIET COMPONENTS Runner I18n)
-if (NOT KF5_FOUND)
+if(NOT KF5_FOUND)
return()
endif()
-
+
set(plasmaRunner_SRCS
main.cpp
plasmarunner.cpp
@@ -30,5 +34,5 @@ target_link_libraries(plasma_runner_marble
KF5::I18n
)
-install(TARGETS plasma_runner_marble DESTINATION ${PLUGIN_INSTALL_DIR})
-install(FILES plasma-runner-marble.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+install(TARGETS plasma_runner_marble DESTINATION ${KDE_INSTALL_PLUGINDIR})
+install(FILES plasma-runner-marble.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
diff --git a/src/plugins/runner/gpx/CMakeLists.txt b/src/plugins/runner/gpx/CMakeLists.txt
index e361789..737019e 100644
--- a/src/plugins/runner/gpx/CMakeLists.txt
+++ b/src/plugins/runner/gpx/CMakeLists.txt
@@ -33,8 +33,6 @@ set( gpx_SRCS GpxParser.cpp GpxPlugin.cpp GpxRunner.cpp )
marble_add_plugin( GpxPlugin ${gpx_SRCS} ${gpx_handlers_SRCS} )
-install(FILES marble_gpx.desktop DESTINATION ${APPS_INSTALL_DIR})
-
if( BUILD_MARBLE_TESTS )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
set( TestTrack_SRCS tests/TestTrack.cpp GpxParser.cpp ${gpx_handlers_SRCS} )
@@ -49,15 +47,29 @@ if( BUILD_MARBLE_TESTS )
add_test( TestTrack TestTrack )
endif( BUILD_MARBLE_TESTS )
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
+
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS KIO)
-if(KF5_FOUND)
+if(NOT KF5_FOUND)
+ return()
+endif()
+
+# register marble part as handler
# install again once part is fixed to load and show the passed file
-# install(FILES marble_part_gpx.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(FILES marble_thumbnail_gpx.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+# install(FILES marble_part_gpx.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+# register thumbnail plugin as handler
+install(FILES marble_thumbnail_gpx.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+if(NOT WIN32 AND NOT APPLE)
+ # register marble app as handler
+ install(FILES marble_gpx.desktop DESTINATION ${KDE_INSTALL_APPDIR})
endif()
diff --git a/src/plugins/runner/json/CMakeLists.txt b/src/plugins/runner/json/CMakeLists.txt
index 7525d77..85be01e 100644
--- a/src/plugins/runner/json/CMakeLists.txt
+++ b/src/plugins/runner/json/CMakeLists.txt
@@ -11,21 +11,29 @@ set( JsonPlugin_LIBS Qt5::Script )
marble_add_plugin( JsonPlugin ${json_SRCS} )
-if(WIN32 OR APPLE)
- # nothing to do
-else()
- install(FILES marble_geojson.desktop DESTINATION ${APPS_INSTALL_DIR})
+find_package(ECM QUIET)
+if(NOT ECM_FOUND)
+ return()
endif()
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
-find_package(ECM QUIET)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
-endif()
+
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS KIO)
-if(KF5_FOUND)
+if(NOT KF5_FOUND)
+ return()
+endif()
+
+# register marble part as handler
# install again once part is fixed to load and show the passed file
-# install(FILES marble_part_geojson.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(FILES marble_thumbnail_geojson.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+# install(FILES marble_part_geojson.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+# register thumbnail plugin as handler
+install(FILES marble_thumbnail_geojson.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+if(NOT WIN32 AND NOT APPLE)
+ # register marble app as handler
+ install(FILES marble_geojson.desktop DESTINATION ${KDE_INSTALL_APPDIR})
endif()
+
diff --git a/src/plugins/runner/kml/CMakeLists.txt b/src/plugins/runner/kml/CMakeLists.txt
index ce01b39..b35b6a5 100644
--- a/src/plugins/runner/kml/CMakeLists.txt
+++ b/src/plugins/runner/kml/CMakeLists.txt
@@ -10,26 +10,32 @@ set( kml_SRCS KmlDocument.cpp KmlParser.cpp KmlPlugin.cpp KmlRunner.cpp KmzHandl
marble_add_plugin( KmlPlugin ${kml_SRCS} )
-if(WIN32 OR APPLE)
- # nothing to do
-else()
- install(FILES marble_kml.desktop DESTINATION ${APPS_INSTALL_DIR})
- install(FILES marble_kmz.desktop DESTINATION ${APPS_INSTALL_DIR})
-endif()
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS KIO)
-if(KF5_FOUND)
-# install again once part is fixed to load and show the passed file
-# install(FILES marble_part_kml.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(FILES marble_thumbnail_kml.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(PROGRAMS marble_kmz.desktop DESTINATION ${APPS_INSTALL_DIR})
+if(NOT KF5_FOUND)
+ return()
+endif()
+
+# register marble part as handler
# install again once part is fixed to load and show the passed file
-# install(FILES marble_part_kmz.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(FILES marble_thumbnail_kmz.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+# install(FILES marble_part_kml.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+# install(FILES marble_part_kmz.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+# register thumbnail plugin as handler
+install(FILES marble_thumbnail_kml.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+install(FILES marble_thumbnail_kmz.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+if(NOT WIN32 AND NOT APPLE)
+ # register marble app as handler
+ install(FILES marble_kml.desktop DESTINATION ${KDE_INSTALL_APPDIR})
+ install(FILES marble_kmz.desktop DESTINATION ${KDE_INSTALL_APPDIR})
endif()
diff --git a/src/plugins/runner/osm/CMakeLists.txt b/src/plugins/runner/osm/CMakeLists.txt
index c90fe00..9abfee9 100644
--- a/src/plugins/runner/osm/CMakeLists.txt
+++ b/src/plugins/runner/osm/CMakeLists.txt
@@ -34,21 +34,25 @@ set( osm_SRCS
marble_add_plugin( OsmPlugin ${osm_SRCS} ${osm_writers_SRCS} ${osm_translators_SRCS} )
-if(WIN32 OR APPLE)
- # nothing to do
-else()
- install(FILES marble_osm.desktop DESTINATION ${APPS_INSTALL_DIR})
-endif()
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS KIO)
-if(KF5_FOUND)
-# install again once part is fixed to load and show the passed file
-# install(FILES marble_part_osm.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(FILES marble_thumbnail_osm.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+if(NOT KF5_FOUND)
+ return()
endif()
+
+# register marble part as handler
+# install again once part is fixed to load and show the passed file
+# install(FILES marble_part_osm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+# register thumbnail plugin as handler
+install(FILES marble_thumbnail_osm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
diff --git a/src/plugins/runner/shp/CMakeLists.txt b/src/plugins/runner/shp/CMakeLists.txt
index 5b8c6da..50e29db 100644
--- a/src/plugins/runner/shp/CMakeLists.txt
+++ b/src/plugins/runner/shp/CMakeLists.txt
@@ -12,21 +12,29 @@ set( ShpPlugin_LIBS ${LIBSHP_LIBRARIES} )
marble_add_plugin( ShpPlugin ${shp_SRCS} )
-if(WIN32 OR APPLE)
- # nothing to do
-else()
- install(FILES marble_shp.desktop DESTINATION ${APPS_INSTALL_DIR})
-endif()
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS KIO)
-if(KF5_FOUND)
+if(NOT KF5_FOUND)
+ return()
+endif()
+
+# register marble part as handler
# install again once part is fixed to load and show the passed file
-# install(FILES marble_part_shp.desktop DESTINATION ${SERVICES_INSTALL_DIR})
- install(FILES marble_thumbnail_shp.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+# install(FILES marble_part_shp.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+# register thumbnail plugin as handler
+install(FILES marble_thumbnail_shp.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
+
+if(NOT WIN32 AND NOT APPLE)
+ # register marble app as handler
+ install(FILES marble_shp.desktop DESTINATION ${KDE_INSTALL_APPDIR})
endif()
diff --git a/src/thumbnailer/CMakeLists.txt b/src/thumbnailer/CMakeLists.txt
index be93e1b..e28057a 100644
--- a/src/thumbnailer/CMakeLists.txt
+++ b/src/thumbnailer/CMakeLists.txt
@@ -1,14 +1,16 @@
project(MarbleThumbnailer)
-set(KDE_SKIP_UNINSTALL_TARGET ON CACHE BOOL "KDE uninstall target must be disabled")
find_package(ECM QUIET)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
-if(ECM_FOUND)
- include(KDEInstallDirs)
+if(NOT ECM_FOUND)
+ return()
endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+include(KDEInstallDirs)
+
macro_optional_find_package(KF5 QUIET COMPONENTS KIO)
-if (NOT KF5_FOUND)
+if (NOT KF5_FOUND)
return()
endif()
@@ -21,4 +23,4 @@ target_link_libraries(marblethumbnail
marblewidget
KF5::KIOWidgets
)
-install(TARGETS marblethumbnail DESTINATION ${PLUGIN_INSTALL_DIR})
+install(TARGETS marblethumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR})