summaryrefslogtreecommitdiffstats
path: root/kolf
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-07-09 03:36:23 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-07-09 03:36:45 +0200
commit1b4916175828c66eba9390d3d37fdb75ff22930a (patch)
treedeb3f0890b6efae5b6d78f11b04a00c6dbd447b4 /kolf
parent6f19ced0b8190f95e989dc2b8087ced2b1b3c359 (diff)
downloadtdegames-1b4916175828c66eba9390d3d37fdb75ff22930a.tar.gz
tdegames-1b4916175828c66eba9390d3d37fdb75ff22930a.zip
Simplify CMake rules for desktop file translations.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit b21981e7e3134727c651ee6a0f7865396cd1d415)
Diffstat (limited to 'kolf')
-rw-r--r--kolf/CMakeLists.txt26
-rw-r--r--kolf/courses/CMakeLists.txt14
2 files changed, 17 insertions, 23 deletions
diff --git a/kolf/CMakeLists.txt b/kolf/CMakeLists.txt
index ce80c874..2b5df507 100644
--- a/kolf/CMakeLists.txt
+++ b/kolf/CMakeLists.txt
@@ -68,13 +68,11 @@ add_custom_command ( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/kolf.magic.mgc"
add_custom_target( kolf-magic-mgc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/kolf.magic.mgc" )
-foreach( _mimetype x-kourse.desktop x-kolf.desktop )
- tde_create_translated_desktop(
- SOURCE ${_mimetype}
- DESTINATION ${MIME_INSTALL_DIR}/application
- PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kolf-desktops
- )
-endforeach()
+tde_create_translated_desktop(
+ SOURCE x-kourse.desktop x-kolf.desktop
+ DESTINATION ${MIME_INSTALL_DIR}/application
+ PO_DIR kolf-desktops
+)
install( FILES kolf.magic "${CMAKE_CURRENT_BINARY_DIR}/kolf.magic.mgc"
DESTINATION ${CONFIG_INSTALL_DIR}/magic
@@ -82,16 +80,14 @@ install( FILES kolf.magic "${CMAKE_CURRENT_BINARY_DIR}/kolf.magic.mgc"
tde_create_translated_desktop(
SOURCE kolf.desktop
- PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kolf-desktops
+ PO_DIR kolf-desktops
)
-foreach( _course intro tutorial.kolf )
- tde_create_translated_desktop(
- SOURCE ${_course}
- DESTINATION ${DATA_INSTALL_DIR}/kolf
- PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kolf-courses
- )
-endforeach()
+tde_create_translated_desktop(
+ SOURCE intro tutorial.kolf
+ DESTINATION ${DATA_INSTALL_DIR}/kolf
+ PO_DIR kolf-courses
+)
install( FILES kolfui.rc tutorial.kolfgame
DESTINATION ${DATA_INSTALL_DIR}/kolf
diff --git a/kolf/courses/CMakeLists.txt b/kolf/courses/CMakeLists.txt
index ac4a494e..f5ccfcea 100644
--- a/kolf/courses/CMakeLists.txt
+++ b/kolf/courses/CMakeLists.txt
@@ -1,11 +1,9 @@
# This file is genereted by trinity-automake-cmake-convert script by Fat-Zer
-foreach( _course Classic.kolf Hard.kolf Medium.kolf Easy.kolf
- ReallyEasy Practice Impossible USApro
+tde_create_translated_desktop(
+ SOURCE
+ Classic.kolf Hard.kolf Medium.kolf Easy.kolf
+ ReallyEasy Practice Impossible USApro
+ DESTINATION ${DATA_INSTALL_DIR}/kolf/courses
+ PO_DIR ${CMAKE_SOURCE_DIR}translations/desktop_files/kolf-courses
)
- tde_create_translated_desktop(
- SOURCE ${_course}
- DESTINATION ${DATA_INSTALL_DIR}/kolf/courses
- PO_DIR ${CMAKE_SOURCE_DIR}translations/desktop_files/kolf-courses
- )
-endforeach()