diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-04-18 14:04:42 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2019-04-20 08:33:07 +0000 |
commit | 077006a9ea18305a183e2cf809e3b88e5f7f3619 (patch) | |
tree | e1219b0e8e9bbf189881cd4ab030438fd6e15745 /sources/shiboken2/CMakeLists.txt | |
parent | 48625f9447caaea3fb9524169bb75dd881cdf4c9 (diff) |
Modernize and clean up some of the shiboken build system files
Use target_* commands instead of subdirectory based commands
for adding link options, compile definitions, include directories,
etc.
Remove some non-used compile definitions.
Move around some of the find_package() and option() calls.
Simplify some of the package dependent logic.
Replace the qt include and linking variables with CMake targets.
Change-Id: I815595344e63a32dce3dc78652359beede3ff593
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/CMakeLists.txt')
-rw-r--r-- | sources/shiboken2/CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt index 0f39bff61..12429c657 100644 --- a/sources/shiboken2/CMakeLists.txt +++ b/sources/shiboken2/CMakeLists.txt @@ -11,22 +11,25 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data/") include(helpers) include(shiboken_helpers) +option(BUILD_TESTS "Build tests." TRUE) +option(USE_PYTHON_VERSION "Use specific python version to build shiboken2." "") +option(DISABLE_DOCSTRINGS "Disable documentation extraction." FALSE) + 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) +if(BUILD_TESTS) + find_package(Qt5Test 5.12 REQUIRED) +endif() -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." "") - # Don't display "up-to-date / install" messages when installing, to reduce visual clutter. if (QUIET_BUILD) set(CMAKE_INSTALL_MESSAGE NEVER) |