diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-18 18:03:40 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-18 18:18:38 +0100 |
commit | 3c7675d9609a15bea81884560920bded736f79a6 (patch) | |
tree | 45b4d16484b4ec41d74f428fae981bd3b7e80517 /src/linguist | |
parent | 11ba0616668a40b077a5b8e50429e274a4b297fd (diff) | |
parent | 47689d484a6254c2eef3ee382ea5e2775a020c0f (diff) | |
download | qttools-3c7675d9609a15bea81884560920bded736f79a6.tar.gz |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
Change-Id: Ia803aad211281c71a8d13b403d83fb5ec3b2cb2c
Diffstat (limited to 'src/linguist')
-rw-r--r-- | src/linguist/Qt5LinguistToolsMacros.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake index 6013cc6ee..8e363a40f 100644 --- a/src/linguist/Qt5LinguistToolsMacros.cmake +++ b/src/linguist/Qt5LinguistToolsMacros.cmake @@ -84,13 +84,15 @@ endfunction() function(QT5_ADD_TRANSLATION _qm_files) foreach(_current_FILE ${ARGN}) get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) - get_filename_component(qm ${_abs_FILE} NAME_WE) + get_filename_component(qm ${_abs_FILE} NAME) + # everything before the last dot has to be considered the file name (including other dots) + string(REGEX REPLACE "\\.[^.]*$" "" FILE_NAME ${qm}) get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION) if(output_location) file(MAKE_DIRECTORY "${output_location}") - set(qm "${output_location}/${qm}.qm") + set(qm "${output_location}/${FILE_NAME}.qm") else() - set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm") endif() add_custom_command(OUTPUT ${qm} |