summaryrefslogtreecommitdiffstats
path: root/po/CMakeLists.txt
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2021-03-03 21:42:42 +0100
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-03-05 10:42:12 +0900
commit38c6a406f3b082bcd57edf1c477564d26a9cb6c8 (patch)
tree7c418ed8bff0857ac221ce748a576a57a2f08ddf /po/CMakeLists.txt
parent02835b2f5219a8eb8c6c9477bd6dd7ce7d54ac0e (diff)
downloadkstreamripper-38c6a406f3b082bcd57edf1c477564d26a9cb6c8.tar.gz
kstreamripper-38c6a406f3b082bcd57edf1c477564d26a9cb6c8.zip
Drop scons build support.
Deleted empty file ChangeLog. Update some cmake files with latest macros. Add basic cmake build instructions. Few cosmetics. Signed-off-by: gregory guy <gregory-tde@laposte.net> (cherry picked from commit 48deaabecefea835f81c9e6e8ba73ee8881c314c)
Diffstat (limited to 'po/CMakeLists.txt')
-rw-r--r--po/CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 46fba83..75c89f8 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -1,6 +1,14 @@
-# build translations if some are already available
+file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
-file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
-if( _srcs )
- tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
-endif( )
+foreach( _po ${po_files} )
+ get_filename_component( _lang ${_po} NAME_WE )
+ if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" )
+ if( "${_po}" MATCHES "^([^/]*)/.*" )
+ string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" )
+ else( )
+ set( _component "${PROJECT_NAME}" )
+ endif( )
+ tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} )
+ endif( )
+endforeach( )