CMakeL10n: Allow to use more than one X-POT files.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 5bf1d5e81f)
v3.5.13-sru
Slávek Banko 3 years ago
parent af93e6c049
commit f723653f70
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -202,7 +202,7 @@ macro( tde_l10n_create_template )
unset( _keywords_add ) unset( _keywords_add )
unset( _comment ) unset( _comment )
unset( _attributes ) unset( _attributes )
unset( _exclude_pot ) unset( _exclude_pots )
unset( _pot ) unset( _pot )
unset( _directive ) unset( _directive )
set( _var _catalog ) set( _var _catalog )
@ -271,8 +271,8 @@ macro( tde_l10n_create_template )
# found directive "X-POT" # found directive "X-POT"
if( "+${_arg}" STREQUAL "+X-POT" ) if( "+${_arg}" STREQUAL "+X-POT" )
unset( _exclude_pot ) unset( _exclude_pots )
set( _var _exclude_pot ) set( _var _exclude_pots )
set( _directive 1 ) set( _directive 1 )
endif( ) endif( )
@ -380,17 +380,16 @@ macro( tde_l10n_create_template )
endif( ) endif( )
# prepare x-pot # prepare x-pot
if( NOT _exclude_pot ) foreach( _exclude_pot_file ${TDE_COMMON_TEXTS_POT} ${_exclude_pots} )
set( _exclude_pot "${TDE_COMMON_TEXTS_POT}" ) if( "${_exclude_pot_file}" STREQUAL "-" )
endif( ) unset( _exclude_pot )
if( "${_exclude_pot}" STREQUAL "-" ) else()
unset( _exclude_pot ) if( NOT IS_ABSOLUTE "${_exclude_pot_file}" )
else( ) set( _exclude_pot_file "${CMAKE_CURRENT_SOURCE_DIR}/${_exclude_pot_file}" )
if( ${_exclude_pot} MATCHES "^[^/]" ) endif()
set( _exclude_pot "${CMAKE_CURRENT_SOURCE_DIR}/${_exclude_pot}" ) list( APPEND _exclude_pot "-x${_exclude_pot_file}" )
endif( ) endif( )
set( _exclude_pot "-x${_exclude_pot}" ) endforeach( )
endif( )
# prepare comment # prepare comment
if( NOT "${_comment}" STREQUAL "" ) if( NOT "${_comment}" STREQUAL "" )

Loading…
Cancel
Save