Make file paths in pot-file relative to project directory.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2021-05-25 08:39:13 +02:00
parent 15a6436597
commit af58d6e35a
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
set(potfile "${PROJECT_SOURCE_DIR}/translations/${PROJECT_NAME}.pot")
file(GLOB po_src_files "../src/*pp")
file(GLOB po_src_files_relative RELATIVE "${PROJECT_SOURCE_DIR}" "../src/*pp")
add_custom_command(OUTPUT ${potfile}
COMMAND "${XGETTEXT_CMD}"
@ -13,7 +14,7 @@ add_custom_command(OUTPUT ${potfile}
"--from-code=utf-8"
"--foreign-user"
"--output=${potfile}"
${po_src_files}
${po_src_files_relative}
DEPENDS "${po_src_files}"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMENT "Extract translatable messages to ${potfile}")
@ -21,6 +22,7 @@ add_custom_target(${PROJECT_NAME}_pot
ALL DEPENDS ${potfile})
unset(po_src_files)
unset(po_src_files_relative)
file(GLOB po_files "*.po")