Commit a5a00baa authored by Laurent Montel's avatar Laurent Montel 😁

Use new KDE_ macro

parent 8699a62b
......@@ -2,7 +2,7 @@ project(kspaceduel)
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 Qml Quick QuickWidgets Svg Test)
......@@ -29,6 +29,7 @@ find_package(Phonon4Qt5 CONFIG REQUIRED)
include_directories(BEFORE ${PHONON_INCLUDES})
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
......@@ -60,22 +61,23 @@ ki18n_wrap_ui(kspaceduel_SRCS general.ui )
kconfig_add_kcfg_files(kspaceduel_SRCS options.kcfgc )
kde4_add_app_icon(kspaceduel_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-kspaceduel.png")
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-apps-kspaceduel.png")
ecm_add_app_icon(kspaceduel_SRCS ICONS ${ICONS_SRCS})
add_executable(kspaceduel ${kspaceduel_SRCS})
target_link_libraries(kspaceduel KF5KDEGames KF5::KDELibs4Support Qt5::Svg)
install(TARGETS kspaceduel ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES default_theme.svgz DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites )
install(TARGETS kspaceduel ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES default_theme.svgz DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites )
########### install files ###############
install( PROGRAMS org.kde.kspaceduel.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES kspaceduel.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES kspaceduelui.rc DESTINATION ${XDG_APPS_INSTALL_DIR}/kspaceduel )
install( PROGRAMS org.kde.kspaceduel.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES kspaceduel.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
install( FILES kspaceduelui.rc DESTINATION ${KDE_INSTALL_APPDIR}/kspaceduel )
ecm_install_icons( ICONS hi128-apps-kspaceduel.png hi16-apps-kspaceduel.png hi22-apps-kspaceduel.png hi32-apps-kspaceduel.png hi48-apps-kspaceduel.png hi64-apps-kspaceduel.png DESTINATION ${ICON_INSTALL_DIR} )
ecm_install_icons( ICONS hi128-apps-kspaceduel.png hi16-apps-kspaceduel.png hi22-apps-kspaceduel.png hi32-apps-kspaceduel.png hi48-apps-kspaceduel.png hi64-apps-kspaceduel.png DESTINATION ${KDE_INSTALL_ICONDIR} )
......
########### install files ###############
#
#
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kspaceduel)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kspaceduel)
ecm_install_icons( ICONS hi16-actions-spnewgame.png hi16-actions-spnewround.png hi16-actions-sppausegame.png hi22-actions-spnewgame.png hi22-actions-spnewround.png hi22-actions-sppausegame.png hi32-actions-spnewgame.png hi32-actions-spnewround.png hi32-actions-sppausegame.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/icons )
ecm_install_icons( ICONS hi16-actions-spnewgame.png hi16-actions-spnewround.png hi16-actions-sppausegame.png hi22-actions-spnewgame.png hi22-actions-spnewround.png hi22-actions-sppausegame.png hi32-actions-spnewgame.png hi32-actions-spnewround.png hi32-actions-sppausegame.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/icons )
......@@ -3,7 +3,7 @@ add_subdirectory(playerinfo)
########### install files ###############
install( FILES backgr.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites )
install( FILES backgr.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites )
......
......@@ -5,7 +5,7 @@
########### install files ###############
install( FILES explos05.png explos11.png explos17.png explos23.png explos29.png mineex04.png mineex10.png mineex16.png
explos00.png explos06.png explos12.png explos18.png explos24.png explos30.png mineex05.png mineex11.png mineex17.png explos01.png explos07.png explos13.png explos19.png explos25.png mineex00.png mineex06.png mineex12.png explos02.png explos08.png explos14.png explos20.png explos26.png mineex01.png mineex07.png mineex13.png explos03.png explos09.png explos15.png explos21.png explos27.png mineex02.png mineex08.png mineex14.png explos04.png explos10.png explos16.png explos22.png explos28.png mineex03.png mineex09.png mineex15.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites/explosion )
explos00.png explos06.png explos12.png explos18.png explos24.png explos30.png mineex05.png mineex11.png mineex17.png explos01.png explos07.png explos13.png explos19.png explos25.png mineex00.png mineex06.png mineex12.png explos02.png explos08.png explos14.png explos20.png explos26.png mineex01.png mineex07.png mineex13.png explos03.png explos09.png explos15.png explos21.png explos27.png mineex02.png mineex08.png mineex14.png explos04.png explos10.png explos16.png explos22.png explos28.png mineex03.png mineex09.png mineex15.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites/explosion )
......
......@@ -4,7 +4,7 @@
########### install files ###############
install( FILES energy.png mine.png ship10.png ship11.png ship12.png ship13.png ship20.png ship21.png ship22.png ship23.png win.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites/playerinfo )
install( FILES energy.png mine.png ship10.png ship11.png ship12.png ship13.png ship20.png ship21.png ship22.png ship23.png win.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites/playerinfo )
......
......@@ -4,7 +4,7 @@
########### install files ###############
install( FILES pbullet.png penergy.png pmine.png pshield.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites/powerups )
install( FILES pbullet.png penergy.png pmine.png pshield.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites/powerups )
......
......@@ -4,7 +4,7 @@
########### install files ###############
install( FILES ship.png mine0.png mine1.png bullet.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites/ship1 )
install( FILES ship.png mine0.png mine1.png bullet.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites/ship1 )
......
......@@ -4,7 +4,7 @@
########### install files ###############
install( FILES ship.png mine0.png mine1.png bullet.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites/ship2 )
install( FILES ship.png mine0.png mine1.png bullet.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites/ship2 )
......
......@@ -4,7 +4,7 @@
########### install files ###############
install( FILES sun.png DESTINATION ${DATA_INSTALL_DIR}/kspaceduel/sprites/sun )
install( FILES sun.png DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites/sun )
......
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