From bd61c233a592d17b342cf7484a3dbba93d072d0e Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 12 Mar 2018 20:38:47 +0100 Subject: [PATCH] CMake target to generate the main pot file (#786) --- resources/localization/list.txt | 36 ++++++++++++++++----------------- xs/CMakeLists.txt | 9 +++++++++ 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/resources/localization/list.txt b/resources/localization/list.txt index 63919ec35..5a6965d6a 100644 --- a/resources/localization/list.txt +++ b/resources/localization/list.txt @@ -1,18 +1,18 @@ -c:\src\Slic3r\xs\src\slic3r\GUI\BedShapeDialog.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\BedShapeDialog.hpp -c:\src\Slic3r\xs\src\slic3r\GUI\GUI.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\Tab.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\Tab.hpp -c:\src\Slic3r\xs\src\slic3r\GUI\Field.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\OptionsGroup.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\2DBed.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\PresetHints.cpp -c:\src\Slic3r\xs\src\slic3r\GUI\Preferences.hpp -c:\src\Slic3r\xs\src\slic3r\GUI\Preferences.cpp -C:\src\Slic3r\xs\src\libslic3r\PrintConfig.cpp -c:\src\Slic3r\xs\src\libslic3r\GCode\PreviewData.cpp -c:\src\Slic3r\lib\Slic3r\GUI.pm -c:\src\Slic3r\lib\Slic3r\GUI\MainFrame.pm -c:\src\Slic3r\lib\Slic3r\GUI\Plater.pm -c:\src\Slic3r\lib\Slic3r\GUI\Plater\2D.pm -c:\src\Slic3r\lib\Slic3r\GUI\Plater\3DPreview.pm +xs/src/slic3r/GUI/BedShapeDialog.cpp +xs/src/slic3r/GUI/BedShapeDialog.hpp +xs/src/slic3r/GUI/GUI.cpp +xs/src/slic3r/GUI/Tab.cpp +xs/src/slic3r/GUI/Tab.hpp +xs/src/slic3r/GUI/Field.cpp +xs/src/slic3r/GUI/OptionsGroup.cpp +xs/src/slic3r/GUI/2DBed.cpp +xs/src/slic3r/GUI/PresetHints.cpp +xs/src/slic3r/GUI/Preferences.hpp +xs/src/slic3r/GUI/Preferences.cpp +xs/src/libslic3r/PrintConfig.cpp +xs/src/libslic3r/GCode/PreviewData.cpp +lib/Slic3r/GUI.pm +lib/Slic3r/GUI/MainFrame.pm +lib/Slic3r/GUI/Plater.pm +lib/Slic3r/GUI/Plater/2D.pm +lib/Slic3r/GUI/Plater/3DPreview.pm diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index db7a3eead..ce16a08f5 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -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)