summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-12-03 19:26:25 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-12-03 19:26:25 +0000
commit22b0528fc3c5adc110c3d6092ace21084480e389 (patch)
tree534af542e386c443bfd25f147fb9d59c061c4fd2
parentd53e6f0308bdd4b8d06d15e2d6f2be4daa5f4e6b (diff)
downloadnavit-22b0528fc3c5adc110c3d6092ace21084480e389.tar.gz
Fix:Build:Check for glade support in xgettext
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3749 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--CMakeLists.txt6
-rw-r--r--po/CMakeLists.txt6
2 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 996a82dac..b20303da7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -301,6 +301,12 @@ add_subdirectory (navit)
add_subdirectory (man)
if (GETTEXT_FOUND)
+ execute_process(COMMAND echo "<test/>" COMMAND xgettext -L glade - RESULT_VARIABLE GETTEXT_RET)
+ if ("${GETTEXT_RET}" STREQUAL "0")
+ set(XGETTEXT_GLADE TRUE)
+ else()
+ set(XGETTEXT_GLADE FALSE)
+ endif()
add_subdirectory (po)
endif(GETTEXT_FOUND)
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index a0f66b32c..2f9218ea5 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -11,8 +11,10 @@ set(POTFILES
${PROJECT_SOURCE_DIR}/navit/gui/gtk/gui_gtk_statusbar.c
${PROJECT_SOURCE_DIR}/navit/gui/internal/gui_internal.c
${CMAKE_CURRENT_BINARY_DIR}/navit_shipped.c
- ${CMAKE_CURRENT_BINARY_DIR}/navit_shipped.glade
-)
+)
+if (XGETTEXT_GLADE)
+ list(APPEND POTFILES ${CMAKE_CURRENT_BINARY_DIR}/navit_shipped.glade)
+endif()
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/navit_shipped.c