Browse Source

CMake: Do not add po/ if USE_NLS is OFF

Previously, we would have generated all the translations, but not
turn them on in the code. Instead, move the Translation crap into
po/ and disable po/ alltogether if USE_NLS if OFF.
Julian Andres Klode 7 years ago
parent
commit
ac103d45f6
2 changed files with 6 additions and 2 deletions
  1. 4 2
      CMakeLists.txt
  2. 2 0
      po/CMakeLists.txt

+ 4 - 2
CMakeLists.txt

@@ -19,7 +19,6 @@ endif()
 
 # Include stuff
 include(Misc)
-include(Translations)
 include(CheckIncludeFiles)
 include(CheckFunctionExists)
 include(CheckStructHasMember)
@@ -144,11 +143,14 @@ add_subdirectory(doc)
 add_subdirectory(dselect)
 add_subdirectory(ftparchive)
 add_subdirectory(methods)
-add_subdirectory(po)
 add_subdirectory(test)
 
+if (USE_NLS)
+add_subdirectory(po)
+
 # Link update-po4a into the update-po target
 add_dependencies(update-po update-po4a)
+endif()
 
 # Create our directories.
 install_empty_directories(

+ 2 - 0
po/CMakeLists.txt

@@ -1,3 +1,5 @@
+include(Translations)
+
 set(languages_excluded
     he  ## disabled by translator request #313283
 )