Skip to content

Commit

Permalink
make doc lang configurable with cmake (#10685)
Browse files Browse the repository at this point in the history
* make doc lang configurable with cmake

* cmake: only print DOC_LANG config if ENABLE_DOCS defined
  • Loading branch information
traeak authored Oct 29, 2023
1 parent 0696e67 commit 496a256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ if(ENABLE_EXAMPLE)
endif()

if(ENABLE_DOCS)
set(DOC_LANG en CACHE STRING "Document language option")
add_subdirectory(doc)
endif()
add_subdirectory(rc)
Expand Down Expand Up @@ -716,5 +717,8 @@ cmake_print_variables(TS_PKGSYSGROUP)
cmake_print_variables(BUILD_MACHINE)
cmake_print_variables(DEFAULT_STACK_SIZE)
cmake_print_variables(CMAKE_INSTALL_RPATH)
if(DEFINED DOC_LANG)
cmake_print_variables(DOC_LANG)
endif(DEFINED DOC_LANG)

print_auto_options_summary()
2 changes: 1 addition & 1 deletion doc/conf.cmake.in.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def setup(app):

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
language = '@DOC_LANG@'
locale_dirs = ['locale/']
gettext_compact = False

Expand Down

0 comments on commit 496a256

Please sign in to comment.