summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2016-04-13 09:34:23 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2016-04-13 09:34:23 +0000
commit5be8d2b5c94eda6bccb40c265c97607c5f7e998f (patch)
treef22f00ea1a1014de197d534d990fa1ce15268476
parentSimplify SPCanvas by tracking the clean region instead of the dirty region. (diff)
downloadinkscape-5be8d2b5c94eda6bccb40c265c97607c5f7e998f.tar.gz
inkscape-5be8d2b5c94eda6bccb40c265c97607c5f7e998f.zip
Disable inkscape.desktop translation for old gettext
(bzr r14817)
-rw-r--r--po/CMakeLists.txt19
1 files changed, 15 insertions, 4 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 9261765c6..9e6b56f64 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -9,8 +9,19 @@ endforeach(language)
#translates inkscape.desktop
add_custom_target(inkscape_desktop DEPENDS ${CMAKE_BINARY_DIR}/inkscape.desktop)
-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/inkscape.desktop
-DEPENDS ${LANGUAGES}
-COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --desktop --template ${CMAKE_SOURCE_DIR}/inkscape.desktop.template -d ${CMAKE_CURRENT_SOURCE_DIR} -o ${CMAKE_BINARY_DIR}/inkscape.desktop.template.in --keyword=Name --keyword=GenericName --keyword=X-GNOME-FullName --keyword=Comment --keyword=Keywords
-COMMAND ${CMAKE_COMMAND} -DINKSCAPE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -DINKSCAPE_BINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/CMakeScripts/inkscape-desktop.cmake)
+
+if(${GETTEXT_VERSION_STRING} VERSION_GREATER "0.19")
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/inkscape.desktop
+ DEPENDS ${LANGUAGES}
+ COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --desktop --template ${CMAKE_SOURCE_DIR}/inkscape.desktop.template -d ${CMAKE_CURRENT_SOURCE_DIR} -o ${CMAKE_BINARY_DIR}/inkscape.desktop.template.in --keyword=Name --keyword=GenericName --keyword=X-GNOME-FullName --keyword=Comment --keyword=Keywords
+ COMMAND ${CMAKE_COMMAND} -DINKSCAPE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -DINKSCAPE_BINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/CMakeScripts/inkscape-desktop.cmake
+ )
+else()
+ message("Old gettext version, not translating inkscape.desktop")
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/inkscape.desktop
+ COMMAND cp ${CMAKE_SOURCE_DIR}/inkscape.desktop.template ${CMAKE_BINARY_DIR}/inkscape.desktop.template.in
+ COMMAND ${CMAKE_COMMAND} -DINKSCAPE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -DINKSCAPE_BINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_SOURCE_DIR}/CMakeScripts/inkscape-desktop.cmake
+ )
+endif()
+
add_dependencies(inkscape inkscape_desktop)