summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-07-02 04:17:05 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-07-02 13:07:05 +0200
commit5bf1d5e81f7223919f33921ecfdf86576c0d5324 (patch)
treeab6291436c2fb16fb0dec1eaec2d6a69f2006df1
parent6d6ad623c4ce4ff1f25d0c86ea44ee51165f8095 (diff)
downloadtde-cmake-5bf1d5e81f7223919f33921ecfdf86576c0d5324.tar.gz
tde-cmake-5bf1d5e81f7223919f33921ecfdf86576c0d5324.zip
CMakeL10n: Allow to use more than one X-POT files.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/TDEL10n.cmake25
1 files changed, 12 insertions, 13 deletions
diff --git a/modules/TDEL10n.cmake b/modules/TDEL10n.cmake
index e5989c4..5c0db26 100644
--- a/modules/TDEL10n.cmake
+++ b/modules/TDEL10n.cmake
@@ -202,7 +202,7 @@ macro( tde_l10n_create_template )
unset( _keywords_add )
unset( _comment )
unset( _attributes )
- unset( _exclude_pot )
+ unset( _exclude_pots )
unset( _pot )
unset( _directive )
set( _var _catalog )
@@ -271,8 +271,8 @@ macro( tde_l10n_create_template )
# found directive "X-POT"
if( "+${_arg}" STREQUAL "+X-POT" )
- unset( _exclude_pot )
- set( _var _exclude_pot )
+ unset( _exclude_pots )
+ set( _var _exclude_pots )
set( _directive 1 )
endif( )
@@ -380,17 +380,16 @@ macro( tde_l10n_create_template )
endif( )
# prepare x-pot
- if( NOT _exclude_pot )
- set( _exclude_pot "${TDE_COMMON_TEXTS_POT}" )
- endif( )
- if( "${_exclude_pot}" STREQUAL "-" )
- unset( _exclude_pot )
- else( )
- if( ${_exclude_pot} MATCHES "^[^/]" )
- set( _exclude_pot "${CMAKE_CURRENT_SOURCE_DIR}/${_exclude_pot}" )
+ foreach( _exclude_pot_file ${TDE_COMMON_TEXTS_POT} ${_exclude_pots} )
+ if( "${_exclude_pot_file}" STREQUAL "-" )
+ unset( _exclude_pot )
+ else()
+ if( NOT IS_ABSOLUTE "${_exclude_pot_file}" )
+ set( _exclude_pot_file "${CMAKE_CURRENT_SOURCE_DIR}/${_exclude_pot_file}" )
+ endif()
+ list( APPEND _exclude_pot "-x${_exclude_pot_file}" )
endif( )
- set( _exclude_pot "-x${_exclude_pot}" )
- endif( )
+ endforeach( )
# prepare comment
if( NOT "${_comment}" STREQUAL "" )