@ -34,16 +34,6 @@ if( NOT DEFINED KDE_XGETTEXT_EXECUTABLE )
endif ( )
endif ( )
if ( NOT DEFINED EXTRACTRC_EXECUTABLE )
find_program ( EXTRACTRC_EXECUTABLE
N A M E S e x t r a c t r c
H I N T S " $ { T D E _ P R E F I X } / b i n "
)
if ( NOT EXTRACTRC_EXECUTABLE )
tde_message_fatal ( "extractrc is required but not found" )
endif ( )
endif ( )
if ( NOT DEFINED EXTRACTATTR_EXECUTABLE )
find_program ( EXTRACTATTR_EXECUTABLE
N A M E S e x t r a c t a t t r
@ -181,7 +171,6 @@ macro( tde_l10n_create_template )
unset ( _sources )
unset ( _excludes )
unset ( _files )
unset ( _rcs )
unset ( _desktops )
unset ( _pots )
unset ( _dest )
@ -345,30 +334,21 @@ macro( tde_l10n_create_template )
list ( APPEND _add_keywords "-k${_keyword}" )
endforeach ( )
# p ic k r e s o u r c e f i l e s * . k c f g , * . r c a n d * . u i
# p re p a r e r e s o u r c e f i l e s * . k c f g , * . r c a n d * . u i
foreach ( _src ${ _files } )
if ( ${ _src } MATCHES "\\.(kcfg|rc|ui)(\\.cmake)?(\\.tde_l10n)?$" )
list( APPEND _rcs ${ _src } )
tde_l10n_prepare_xml( ${ _src } )
list ( REMOVE_ITEM _files ${ _src } )
list ( APPEND _files "${_src}.tde_l10n" )
endif ( )
endforeach ( )
# p r e p a r e e x t r a c t e d - r c . t d e _ l 1 0 n
if ( _ rcs OR _ attributes )
if ( _ attributes )
file ( WRITE ${ CMAKE_CURRENT_SOURCE_DIR } /extracted-rc.tde_l10n "" )
list ( APPEND _files extracted-rc.tde_l10n )
endif ( )
# p r o c e s s r e s o u r c e f i l e s
if ( _rcs )
execute_process (
C O M M A N D $ { E X T R A C T R C _ E X E C U T A B L E } $ { _ r c s }
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R }
O U T P U T _ V A R I A B L E _ s o u r c e s _ r c
)
file ( APPEND ${ CMAKE_CURRENT_SOURCE_DIR } /extracted-rc.tde_l10n "${_sources_rc}" )
endif ( )
# e x t r a c t a t t r i b u t e s
if ( _attributes )
foreach ( _attrib ${ _attributes } )
@ -493,7 +473,7 @@ macro( tde_l10n_create_template )
if ( _pot )
# u p d a t e r e f e r e n c e s f o r r e s o u r c e s t o o r i g i n a l f i l e s a n d l i n e n u m b e r s
if ( _ rcs OR _ attributes )
if ( _ attributes )
file ( READ "${CMAKE_CURRENT_SOURCE_DIR}/extracted-rc.tde_l10n" _extractedRC )
string ( REGEX REPLACE "[^\n]" "" _extractedRC_len "${_extractedRC}" )
string ( LENGTH "+${_extractedRC_len}" _extractedRC_len )
@ -532,7 +512,7 @@ macro( tde_l10n_create_template )
endif ( _pot )
# c l e a n u p
foreach ( _file ${ _files } ${ _ rcs} ${ _ desktops} )
foreach ( _file ${ _files } ${ _ desktops} )
if ( "${_file}" MATCHES "\\.tde_l10n$" )
file ( REMOVE ${ CMAKE_CURRENT_SOURCE_DIR } / ${ _file } )
endif ( )