Fix dblatex options within cmake file
authorEugene Kilachkoff <ekilachkoff@gmail.com>
Mon, 29 Apr 2019 18:27:50 +0000 (20:27 +0200)
committerCarsten Schoenert <c.schoenert@t-online.de>
Sat, 12 Feb 2022 09:36:02 +0000 (09:36 +0000)
The logic for setting the options for dblatex on the various languages
wasn't correct. The default option need to be set to an empty string
which is expanded with the additional needed options later, otherwise
previously added options won't get forgotten within the configuration
run for the next language.

Gbp-Pq: Topic fixes
Gbp-Pq: Name Fix-dblatex-options-within-cmake-file.patch

doc/CMakeModules/KiCadDocumentation.cmake

index 9ca905073bef8c169765a725b32741a458957f76..a3ae65403f5040d2df2bc43026e2beb5cd90e934 100644 (file)
@@ -124,17 +124,13 @@ macro( KiCadDocumentation DOCNAME )
                 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/po/${LANGUAGE}.po )
 
             # Non-ascii languages needs some special treatments
+            set(DBLATEX_OPTIONS "")
+            set_dblatex_common_options()
             if( "${LANGUAGE}" MATCHES "ja" )
-                set(DBLATEX_OPTIONS "")
-                set_dblatex_common_options()
                 add_dblatex_option( -b xetex -p ${CMAKE_CURRENT_SOURCE_DIR}/../../xsl/dblatex-pdf-ja.xsl )
             elseif( "${LANGUAGE}" MATCHES "ru" )
-                set(DBLATEX_OPTIONS "")
-                set_dblatex_common_options()
                 add_dblatex_option( -b xetex -p ${CMAKE_CURRENT_SOURCE_DIR}/../../xsl/dblatex-pdf-ru.xsl )
             elseif( "${LANGUAGE}" MATCHES "zh" )
-                set(DBLATEX_OPTIONS "")
-                set_dblatex_common_options()
                 add_dblatex_option( -b xetex -p ${CMAKE_CURRENT_SOURCE_DIR}/../../xsl/dblatex-pdf-zh.xsl )
             endif()