From 496a256693701baf33706571d69b93c6d28231b8 Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Sat, 28 Oct 2023 19:47:11 -0600 Subject: [PATCH] make doc lang configurable with cmake (#10685) * make doc lang configurable with cmake * cmake: only print DOC_LANG config if ENABLE_DOCS defined --- CMakeLists.txt | 4 ++++ doc/conf.cmake.in.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a3ea44a36a..97d2eb19ee4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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() diff --git a/doc/conf.cmake.in.py b/doc/conf.cmake.in.py index e5f534bbff4..a5761d7b129 100644 --- a/doc/conf.cmake.in.py +++ b/doc/conf.cmake.in.py @@ -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