Skip to content

Commit

Permalink
Allow selection of specific translators to compile in at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Jun 5, 2015
1 parent 4716f42 commit faef77a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
9 changes: 5 additions & 4 deletions BUILD.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Doxygen uses cmake (http://www.cmake.org/) to build executables for various platforms.

The first step is to create a build directory where the output should be stored.
Doxygen directory can be fully build outside of the source tree.
Doxygen can be fully build outside of the source tree.

The second step is to invoke cmake from within the build directory with the desired generator.

Expand All @@ -27,11 +27,12 @@ Doxygen's cmake configuration provides a number of options:
- build_wizard Build the GUI frontend for doxygen.
- build_app Example showing how to embed doxygen in an application.
- build_xmlparser Example showing how to parse doxygen's XML output.
- build_search Build external search tools (doxysearch and doxyindexer)
- build_doc Build user manual
- build_search Build external search tools (doxysearch and doxyindexer).
- build_doc Build user manual.
- use_sqlite3 Add support for sqlite3 output [experimental].
- use_libclang Add support for libclang parsing.
- win_static Link with /MT in stead of /MD on windows
- win_static Link with /MT in stead of /MD on windows.
- english_only Only compile in support for the English language.

An option can be turned on, by adding -D<option>=ON as a command line option, this can be
done when generating the initial build files, but also afterwards, i.e. to enable building
Expand Down
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ set(CUSTOM_INCLUDE_DIR "" CACHE FILEPATH "Extra include path")
set(CUSTOM_LINK_DIR "" CACHE FILEPATH "Extra library path")

# gather lang codes for translation
file(GLOB lang_files RELATIVE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/translator_??.h")
set(lcodes "")
foreach (_lang ${lang_files})
string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
string(TOUPPER ${_lang_code} lang_code)
list(APPEND lcodes "${lang_code}")
endforeach()
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()
set(lcodes "ENONLY")
endif()
set(LANG_CODES ${lcodes} CACHE STRING "List of language codes for which translations should be compiled in")

if (${CUSTOM_INCLUDE_DIR})
include_directories(${CUSTOM_INCLUDE_DIR})
Expand Down

0 comments on commit faef77a

Please sign in to comment.