diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-06 16:45:23 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-06 18:33:43 +0200 |
commit | 3033b99b5158c12f520ac6026d26c3f77783c56d (patch) | |
tree | d09762d1ba7a6cffeb181a9fb152aba5d8d6f311 /sources/shiboken2/CMakeLists.txt | |
parent | 514d5fda1909370e90b20b937b91463512f8d9af (diff) |
shiboken: Prepare build system for Qt 6
Introduce a version variable to the CMakeLists.
Task-number: PYSIDE-904
Change-Id: Icf823db22025f6d4ac1867ae86e9357fff824daa
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/CMakeLists.txt')
-rw-r--r-- | sources/shiboken2/CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt index c1349cae6..3a9f2378b 100644 --- a/sources/shiboken2/CMakeLists.txt +++ b/sources/shiboken2/CMakeLists.txt @@ -18,7 +18,9 @@ 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) +set (QT_MAJOR_VERSION 5) +message(STATUS "Using Qt ${QT_MAJOR_VERSION}") +find_package(Qt${QT_MAJOR_VERSION} 5.12 REQUIRED COMPONENTS Core) if (QUIET_BUILD) set_quiet_build() @@ -208,7 +210,7 @@ add_subdirectory(libshiboken) add_subdirectory(doc) # deps found, compile the generator. -if (Qt5Core_FOUND AND PYTHONINTERP_FOUND) +if (Qt${QT_MAJOR_VERSION}Core_FOUND AND PYTHONINTERP_FOUND) add_subdirectory(generator) add_subdirectory(shibokenmodule) |