summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-07 13:36:11 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-10 16:10:57 +0200
commitba69ce6d3473debec4b95e02f12670f345c86673 (patch)
treebd4d9d0213ec11168b34baa3782e57b619c37aa9 /CMake
parent33ee08e4dae7851bc3bcbb932a0563c38c933ead (diff)
downloadapt-ba69ce6d3473debec4b95e02f12670f345c86673.tar.gz
CMake: Translations: Make po templates depend on input files
I wondered why the template was not rebuilt after I changed a file, now I have the answer. Gbp-Dch: ignore
Diffstat (limited to 'CMake')
-rw-r--r--CMake/Translations.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake
index 2a1e03d4c..3a05d80b0 100644
--- a/CMake/Translations.cmake
+++ b/CMake/Translations.cmake
@@ -5,6 +5,7 @@ function(apt_add_translation_domain domain)
set(targets ${ARGN})
# Build the list of source files of the target
set(files "")
+ set(abs_files "")
foreach(target ${targets})
get_target_property(source_dir ${target} SOURCE_DIR)
get_target_property(sources ${target} SOURCES)
@@ -18,6 +19,7 @@ function(apt_add_translation_domain domain)
endif()
file(RELATIVE_PATH relfile ${PROJECT_SOURCE_DIR} ${file})
set(files ${files} ${relfile})
+ set(abs_files ${abs_files} ${file})
endforeach()
target_compile_definitions(${target} PRIVATE -DAPT_DOMAIN="${domain}")
@@ -27,6 +29,7 @@ function(apt_add_translation_domain domain)
add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/${domain}.pot
COMMAND xgettext --add-comments --foreign -k_ -kN_
-o ${PROJECT_BINARY_DIR}/${domain}.pot ${files}
+ DEPENDS ${abs_files}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)