diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-07 07:56:20 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-18 15:13:21 +0200 |
commit | 0c6e4506e5c0b6aacdf48fd777eb452d91732157 (patch) | |
tree | 92a94c6ad5f13a1fbece06896b11763b3c830769 /sources/shiboken2/CMakeLists.txt | |
parent | 59352c3ed2364e09b9c4dae91bd7a16755ea4d95 (diff) |
pyside2: Prepare build system for Qt 6
- Introduce a version variable to the CMakeLists.
- Emulate the Qt5Core_INCLUDE_DIRS, Qt5Core_LIBRARIES variables
by retrieving them from the INTERFACE
- Raise the language level
Task-number: PYSIDE-904
Change-Id: Ie4e43e7e6a9a2631d666038b80f306e2d9af47b1
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/CMakeLists.txt')
-rw-r--r-- | sources/shiboken2/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt index 3a9f2378b..5877971a9 100644 --- a/sources/shiboken2/CMakeLists.txt +++ b/sources/shiboken2/CMakeLists.txt @@ -114,7 +114,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_T # Force usage of the C++11 standard, without a silent fallback # to C++98 if the compiler does not support C++11. -set(CMAKE_CXX_STANDARD 11) +if(${QT_MAJOR_VERSION} GREATER_EQUAL 6) + set(CMAKE_CXX_STANDARD 17) +else() + set(CMAKE_CXX_STANDARD 11) +endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) |