diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-11 17:42:10 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-11 17:42:10 +0000 |
| commit | e7305f533cda8ae75f4edb02a069eb11f81ab213 (patch) | |
| tree | 2e13e4f3f2e3e4bc6e59397ca25b2d37f5a12ac8 /share | |
| parent | Add line info back (diff) | |
| download | inkscape-e7305f533cda8ae75f4edb02a069eb11f81ab213.tar.gz inkscape-e7305f533cda8ae75f4edb02a069eb11f81ab213.zip | |
CMake: Do not create default templates when building without NLS
(create_default_templates.py needs binary .mo files to extract strings)
Diffstat (limited to 'share')
| -rw-r--r-- | share/templates/CMakeLists.txt | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/share/templates/CMakeLists.txt b/share/templates/CMakeLists.txt index bb1801066..be87747f7 100644 --- a/share/templates/CMakeLists.txt +++ b/share/templates/CMakeLists.txt @@ -14,21 +14,25 @@ install(FILES ${_FILES} "README" DESTINATION ${INKSCAPE_SHARE_INSTALL}/templates # create localized versions of default.svg -file(GLOB POFILES ${CMAKE_SOURCE_DIR}/po/*.po) - foreach(pofile ${POFILES}) - string(REGEX REPLACE "(.+(\\\\|/))+" "${CMAKE_BINARY_DIR}/po/" pofile ${pofile}) - string(REGEX REPLACE "\\.po$" ".gmo" pofile ${pofile}) - list(APPEND GMOFILES "${pofile}") -endforeach(pofile) +if(ENABLE_NLS) + file(GLOB POFILES ${CMAKE_SOURCE_DIR}/po/*.po) + foreach(pofile ${POFILES}) + string(REGEX REPLACE "(.+(\\\\|/))+" "${CMAKE_BINARY_DIR}/po/" pofile ${pofile}) + string(REGEX REPLACE "\\.po$" ".gmo" pofile ${pofile}) + list(APPEND GMOFILES "${pofile}") + endforeach(pofile) -add_custom_command( - OUTPUT default_templates.timestamp - COMMAND python ./create_default_templates.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/default.svg ${CMAKE_CURRENT_SOURCE_DIR}/create_default_templates.py ${GMOFILES} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Generating localized default templates" -) -add_custom_target(default_templates ALL DEPENDS default_templates.timestamp) + add_custom_command( + OUTPUT default_templates.timestamp + COMMAND python ./create_default_templates.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/default.svg ${CMAKE_CURRENT_SOURCE_DIR}/create_default_templates.py ${GMOFILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating localized default templates" + ) + add_custom_target(default_templates ALL DEPENDS default_templates.timestamp) -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${INKSCAPE_SHARE_INSTALL} - FILES_MATCHING PATTERN "*.svg" PATTERN "CMakeFiles" EXCLUDE ) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${INKSCAPE_SHARE_INSTALL} + FILES_MATCHING PATTERN "*.svg" PATTERN "CMakeFiles" EXCLUDE ) +else() + message(STATUS "Generation of localized default templates will be skipped (building without NLS)") +endif() |
