@ -1986,7 +1986,6 @@ macro( tde_create_translated_desktop )
if ( EXISTS "${_po_dir}" AND IS_DIRECTORY "${_po_dir}" )
if ( EXISTS "${_po_dir}" AND IS_DIRECTORY "${_po_dir}" )
file ( GLOB _translations RELATIVE "${_po_dir}" "${_po_dir}/*.po" )
file ( GLOB _translations RELATIVE "${_po_dir}" "${_po_dir}/*.po" )
endif ( )
endif ( )
if ( _translations )
# p r e p a r e a f u l l n a m e f o r t h e t a r g e t
# p r e p a r e a f u l l n a m e f o r t h e t a r g e t
get_filename_component ( _target ${ _basename } ABSOLUTE )
get_filename_component ( _target ${ _basename } ABSOLUTE )
@ -1995,6 +1994,11 @@ macro( tde_create_translated_desktop )
if ( NOT TARGET ${ _target } )
if ( NOT TARGET ${ _target } )
# u s e a b s o l u t e p a t h f o r s r c
get_filename_component ( _src ${ _src } ABSOLUTE )
if ( _translations )
if ( DESKTOP_MERGE_MSGFMT )
if ( DESKTOP_MERGE_MSGFMT )
# D e c i d e w h i c h t r a n s l a t i o n s t o b u i l d ; t h e o n e s s e l e c t e d i n t h e
# D e c i d e w h i c h t r a n s l a t i o n s t o b u i l d ; t h e o n e s s e l e c t e d i n t h e
@ -2012,7 +2016,6 @@ macro( tde_create_translated_desktop )
endforeach ( )
endforeach ( )
# m e r g e t r a n s l a t i o n s c o m m a n d
# m e r g e t r a n s l a t i o n s c o m m a n d
get_filename_component ( _src ${ _src } ABSOLUTE )
add_custom_command (
add_custom_command (
O U T P U T $ { _ b a s e n a m e } $ { _ b i n s u f f i x }
O U T P U T $ { _ b a s e n a m e } $ { _ b i n s u f f i x }
C O M M A N D $ { C M A K E _ C O M M A N D } - E e n v " L I N G U A S = $ { _ l i n g u a s } " $ { M S G F M T _ E X E C U T A B L E } - - d e s k t o p - - t e m p l a t e $ { _ s r c } - d $ { _ p o _ d i r } - o $ { _ b a s e n a m e } $ { _ b i n s u f f i x } $ { _ k e y w o r d s _ a r g }
C O M M A N D $ { C M A K E _ C O M M A N D } - E e n v " L I N G U A S = $ { _ l i n g u a s } " $ { M S G F M T _ E X E C U T A B L E } - - d e s k t o p - - t e m p l a t e $ { _ s r c } - d $ { _ p o _ d i r } - o $ { _ b a s e n a m e } $ { _ b i n s u f f i x } $ { _ k e y w o r d s _ a r g }
@ -2026,7 +2029,6 @@ macro( tde_create_translated_desktop )
string ( REPLACE ";" "|" _keywords_match "(${_keywords_desktop})" )
string ( REPLACE ";" "|" _keywords_match "(${_keywords_desktop})" )
# m e r g e t r a n s l a t i o n s c o m m a n d
# m e r g e t r a n s l a t i o n s c o m m a n d
get_filename_component ( _src ${ _src } ABSOLUTE )
add_custom_command (
add_custom_command (
O U T P U T $ { _ b a s e n a m e } $ { _ b i n s u f f i x }
O U T P U T $ { _ b a s e n a m e } $ { _ b i n s u f f i x }
C O M M A N D $ { P E R L _ E X E C U T A B L E } - p - e " ' s / ^ $ { _ k e y w o r d s _ m a t c h } [ ] * = [ ] * / _ \ \ 1 = / ' " < $ { _ s r c } > $ { _ b a s e n a m e } . i n
C O M M A N D $ { P E R L _ E X E C U T A B L E } - p - e " ' s / ^ $ { _ k e y w o r d s _ m a t c h } [ ] * = [ ] * / _ \ \ 1 = / ' " < $ { _ s r c } > $ { _ b a s e n a m e } . i n
@ -2038,15 +2040,20 @@ macro( tde_create_translated_desktop )
endif ( )
endif ( )
# m e r g e t r a n s l a t i o n s t a r g e t
# m e r g e t r a n s l a t i o n s t a r g e t
add_custom_target ( "${_target}" ALL DEPENDS ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } ${ _binsuffix } )
endif ( )
else ( )
else ( )
# j u s t w r i t e t h e o r i g i n a l f i l e w i t h o u t t r a n s l a t i o n s
# j u s t c o p y t h e o r i g i n a l f i l e w i t h o u t t r a n s l a t i o n s
file ( READ ${ _src } _src_data )
add_custom_command (
file ( WRITE ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } ${ _binsuffix } "${_src_data}" )
O U T P U T $ { _ b a s e n a m e } $ { _ b i n s u f f i x }
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y $ { _ s r c } $ { _ b a s e n a m e } $ { _ b i n s u f f i x }
D E P E N D S $ { _ s r c }
C O M M E N T " S k i p i n g t r a n s l a t i o n a n d c o p y i n g s o u r c e f i l e t o $ { _ s o u r c e n a m e } "
)
endif ( )
add_custom_target ( "${_target}" ALL DEPENDS ${ CMAKE_CURRENT_BINARY_DIR } / ${ _basename } ${ _binsuffix } )
endif ( )
endif ( )