CMake target to generate the main pot file (#786)

This commit is contained in:
Vojtech Kral 2018-03-12 20:38:47 +01:00 committed by bubnikv
parent 58788ef43a
commit bd61c233a5
2 changed files with 27 additions and 18 deletions

View file

@ -630,6 +630,15 @@ if (MSVC)
set_target_properties(XS PROPERTIES VS_USER_PROPS "${PROJECT_SOURCE_DIR}/cmake/msvc/xs.wperl64d.props")
endif()
# l10n
set(L10N_DIR "${PROJECT_SOURCE_DIR}/resources/localization")
add_custom_target(pot
COMMAND xgettext --keyword=L --from-code=UTF-8 --debug
-f "${L10N_DIR}/list.txt"
-o "${L10N_DIR}/Slic3rPE.pot"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate pot file from strings in the source tree"
)
# Installation
install(TARGETS XS DESTINATION ${PERL_VENDORARCH}/auto/Slic3r/XS)