summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-05-31 15:12:09 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-05-31 15:12:09 (GMT)
commiteae07d978b524c787daeab911ca087b47a964577 (patch)
treed20439f4d8ce5857eb2ecf2bf569ce3d3ceffff3 /CMakeLists.txt
parent5f67c67323bff27751ba07c417ba99180fa0d762 (diff)
downloadDoxygen-eae07d978b524c787daeab911ca087b47a964577.zip
Doxygen-eae07d978b524c787daeab911ca087b47a964577.tar.gz
Doxygen-eae07d978b524c787daeab911ca087b47a964577.tar.bz2
Added support for language codes
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc36d23..aa1902a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,7 @@ option(build_doc "Build user manual" OFF)
option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF)
option(use_libclang "Add support for libclang parsing." OFF)
option(win_static "Link with /MT in stead of /MD on windows" OFF)
+option(english_only "Only compile in support for the English language" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(version)
@@ -72,6 +73,19 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(CUSTOM_INCLUDE_DIR "" CACHE FILEPATH "Extra include path")
set(CUSTOM_LINK_DIR "" CACHE FILEPATH "Extra library path")
+# gather lang codes for translation
+if (english_only) # user only wants English
+ set(LANG_CODES "ENONLY")
+else() # find languages based on available translator files
+ set(LANG_CODES "")
+ file(GLOB lang_files RELATIVE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/translator_??.h")
+ foreach (_lang ${lang_files})
+ string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
+ string(TOUPPER ${_lang_code} lang_code)
+ list(APPEND LANG_CODES "${lang_code}")
+ endforeach()
+endif()
+
if (${CUSTOM_INCLUDE_DIR})
include_directories(${CUSTOM_INCLUDE_DIR})
endif()