aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-04-18 11:40:47 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-04-18 12:20:58 +0000
commit48625f9447caaea3fb9524169bb75dd881cdf4c9 (patch)
treed766a1ac54b7780478db8242f871585077b834f4 /sources/shiboken2/CMakeLists.txt
parent46c0a33bfaa7c8c936971540762caa59ef96af11 (diff)
Fix shiboken not to fail building when doc dependencies are missing
QtXmlPatterns is now deprecated, and until we port to some other library, the CI will not have XmlPatterns anymore. Change the build system of shiboken to skip building the documentation parts if the dependency is missing. Change-Id: I75d38502cd1efa84f7ec148622ffbf26084d0c35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken2/CMakeLists.txt')
-rw-r--r--sources/shiboken2/CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 1e52c4297..0f39bff61 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -11,7 +11,18 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data/")
include(helpers)
include(shiboken_helpers)
-find_package(Qt5 5.12 REQUIRED COMPONENTS Core Xml XmlPatterns)
+find_package(Qt5 5.12 REQUIRED COMPONENTS Core)
+find_package(Qt5Xml 5.12)
+find_package(Qt5XmlPatterns 5.12)
+find_package(LibXml2 2.6.32)
+find_package(LibXslt 1.1.19)
+
+option(DISABLE_DOCSTRINGS "Disable documentation extraction." FALSE)
+if(NOT Qt5XmlPatterns_FOUND OR NOT Qt5Xml_FOUND)
+ set(DISABLE_DOCSTRINGS TRUE)
+ message(WARNING
+ "Documentation will not be built due to missing dependency (no Qt5XmlPatterns found).")
+endif()
option(BUILD_TESTS "Build tests." TRUE)
option(USE_PYTHON_VERSION "Use specific python version to build shiboken2." "")