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>
Wed, 23 Dec 2020 18:51:45 +0000 (18:51 +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 445fd64258cd1fbdc1298730f2e311bb95d91a31..6211e892981a38f04ca857136f1a7c49bcf669c4 100644 (file)
@@ -123,17 +123,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()