From c20d35d58dec8cb24914794956f8b0da5c335300 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 19 Dec 2019 14:35:26 +0100 Subject: Fix building without doc generator The generator subproject would still add the qtdocgenerator source file even if neither QtXmlPatterns nor libxml/libxslt2 were found, causing link errors. This is since the value of DISABLE_DOCSTRINGS was not propagated up from the ApiExtractor subproject. Set it to the parent scope from there as well. Change-Id: If8dc7b0437ef8a8c1e71d822328bcc3809252b57 Reviewed-by: Cristian Maureira-Fredes --- sources/shiboken2/ApiExtractor/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt index c2a4c208e..65150eb92 100644 --- a/sources/shiboken2/ApiExtractor/CMakeLists.txt +++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt @@ -46,6 +46,9 @@ if(NOT Qt5XmlPatterns_FOUND AND NOT HAS_LIBXSLT) "Documentation will not be built due to missing dependency (no Qt5XmlPatterns found).") endif() +# Export to parent scope so that generator/CMakeLists.txt gets it +set(DISABLE_DOCSTRINGS ${DISABLE_DOCSTRINGS} PARENT_SCOPE) + add_library(apiextractor STATIC ${apiextractor_SRC}) target_include_directories(apiextractor PRIVATE ${CLANG_EXTRA_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} -- cgit v1.2.3