Commit 01d583e7 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Let ECM not mess with normal install path, use KDE_INSTALL_DIRS_NO_DEPRECATED

parent a56db272
......@@ -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
......
......@@ -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()
########### 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()
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})
......@@ -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()
......
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)
......
......@@ -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)
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})
......@@ -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()
......@@ -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()
......@@ -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()
......@@ -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})
......@@ -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()
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})
Supports Markdown
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