summaryrefslogtreecommitdiffstats
path: root/modules/TDEMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/TDEMacros.cmake')
-rw-r--r--modules/TDEMacros.cmake20
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index febfc0c..c1f8ab6 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -1889,8 +1889,8 @@ macro( tde_create_translated_desktop )
# merge translations command
get_filename_component( _src ${_src} ABSOLUTE )
add_custom_command(
- OUTPUT ${_out_name}
- COMMAND ${MSGFMT_EXECUTABLE} --desktop --template ${_src} -d ${_po_dir} -o ${_out_name} ${_keywords_arg}
+ OUTPUT ${_basename}
+ COMMAND ${MSGFMT_EXECUTABLE} --desktop --template ${_src} -d ${_po_dir} -o ${_basename} ${_keywords_arg}
DEPENDS ${_src}
)
@@ -1912,30 +1912,34 @@ macro( tde_create_translated_desktop )
file( READ ${_src} _src_data )
string( REPLACE ";" "|" _keywords_match "(${_keywords_desktop})" )
string( REGEX REPLACE "(^|\n)${_keywords_match}[ ]*=[ ]*" "\\1_\\2=" _src_data "${_src_data}" )
- file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_out_name}.in "${_src_data}" )
+ file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.in "${_src_data}" )
# merge translations command
add_custom_command(
- OUTPUT ${_out_name}
- COMMAND ${INTLTOOL_MERGE_EXECUTABLE} -d ${_po_dir} ${_out_name}.in ${_out_name}
+ OUTPUT ${_basename}
+ COMMAND ${INTLTOOL_MERGE_EXECUTABLE} -d ${_po_dir} ${_basename}.in ${_basename}
DEPENDS ${_src}
)
endif( )
# merge translations target
- add_custom_target( "${_target}" ALL DEPENDS ${_out_name} )
+ add_custom_target( "${_target}" ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_basename} )
else( )
# just write the original file without translations
file( READ ${_src} _src_data )
- file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_out_name} "${_src_data}" )
+ file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_basename} "${_src_data}" )
endif( )
# install traslated desktop file
- install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_out_name} DESTINATION ${_dest} )
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}
+ RENAME ${_out_name}
+ DESTINATION ${_dest}
+ )
endmacro( )