aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2')
-rw-r--r--sources/shiboken2/ApiExtractor/CMakeLists.txt9
-rw-r--r--sources/shiboken2/ApiExtractor/tests/CMakeLists.txt2
-rw-r--r--sources/shiboken2/CMakeLists.txt13
-rw-r--r--sources/shiboken2/generator/CMakeLists.txt3
4 files changed, 15 insertions, 12 deletions
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
index 4c0ac7b30..bd5654303 100644
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
@@ -2,18 +2,15 @@ project(apiextractor)
cmake_minimum_required(VERSION 3.1)
cmake_policy(VERSION 3.1)
-find_package(LibXml2 2.6.32)
-find_package(LibXslt 1.1.19)
-option(DISABLE_DOCSTRINGS "Disable documentation extraction." FALSE)
-
-set (USE_LIBXSLT 0)
+set(USE_LIBXSLT 0)
if (NOT DISABLE_DOCSTRINGS)
if (LIBXSLT_FOUND AND LIBXML2_FOUND)
add_definitions(-DHAVE_LIBXSLT)
set (USE_LIBXSLT 1)
else()
- message(WARNING "libxslt and/or libxml not found, falling back to QtXmlPatterns (QTBUG-66925)")
+ message(WARNING
+ "libxslt and/or libxml not found, falling back to QtXmlPatterns (QTBUG-66925)")
endif()
endif()
diff --git a/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt b/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
index e100ef493..1429a63b1 100644
--- a/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
@@ -1,8 +1,6 @@
find_package(Qt5Core)
find_package(Qt5Gui)
find_package(Qt5Test)
-find_package(Qt5Xml)
-find_package(Qt5XmlPatterns)
set(CMAKE_AUTORCC ON)
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." "")
diff --git a/sources/shiboken2/generator/CMakeLists.txt b/sources/shiboken2/generator/CMakeLists.txt
index 943e8d19b..890790522 100644
--- a/sources/shiboken2/generator/CMakeLists.txt
+++ b/sources/shiboken2/generator/CMakeLists.txt
@@ -1,8 +1,5 @@
project(shibokengenerator)
-find_package(Qt5Xml)
-find_package(Qt5XmlPatterns)
-
set(shiboken2_SRC
generator.cpp
shiboken2/cppgenerator.cpp