aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMPoQmTools.cmake
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@kde.org>2015-10-14 12:18:40 +0100
committerAlex Merry <alex.merry@kde.org>2015-11-14 17:45:29 +0000
commit55c55808298986d13ca461d571069f4214d8174d (patch)
tree51ad9d3ea9f34d7931e3da4c618050d6425cf0dc /modules/ECMPoQmTools.cmake
parentc88bc78e0ca3834c46b89ca9d14b404751da5d4a (diff)
downloadextra-cmake-modules-55c55808298986d13ca461d571069f4214d8174d.tar.gz
extra-cmake-modules-55c55808298986d13ca461d571069f4214d8174d.tar.bz2
Fix multiple calls to ecm_create_qm_loader.
Multiple ecm_create_qm_loader() with different catalog names would overwrite each other's generated files, causing the wrong catalog to be loaded at runtime for some targets. This puts the catalog name into the generated filename. Since the catalog name is the only difference between the generated files, this is sufficient to fix the runtime behaviour. REVIEW: 125999
Diffstat (limited to 'modules/ECMPoQmTools.cmake')
-rw-r--r--modules/ECMPoQmTools.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ECMPoQmTools.cmake b/modules/ECMPoQmTools.cmake
index 12bcf6b6..0af5b12f 100644
--- a/modules/ECMPoQmTools.cmake
+++ b/modules/ECMPoQmTools.cmake
@@ -100,8 +100,8 @@ endfunction()
function(ecm_create_qm_loader out_var catalog_name)
# catalog_name is used in ECMQmLoader.cpp.in
- configure_file(${ECM_MODULE_DIR}/ECMQmLoader.cpp.in ECMQmLoader.cpp @ONLY)
- set(${out_var} ${${out_var}} ${CMAKE_CURRENT_BINARY_DIR}/ECMQmLoader.cpp PARENT_SCOPE)
+ configure_file(${ECM_MODULE_DIR}/ECMQmLoader.cpp.in ECMQmLoader-${catalog_name}.cpp @ONLY)
+ set(${out_var} ${${out_var}} ${CMAKE_CURRENT_BINARY_DIR}/ECMQmLoader-${catalog_name}.cpp PARENT_SCOPE)
endfunction()