From 38c6a406f3b082bcd57edf1c477564d26a9cb6c8 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Wed, 3 Mar 2021 21:42:42 +0100 Subject: 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 (cherry picked from commit 48deaabecefea835f81c9e6e8ba73ee8881c314c) --- po/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'po/CMakeLists.txt') 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( ) -- cgit v1.2.1