From 0c6e4506e5c0b6aacdf48fd777eb452d91732157 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 7 May 2020 07:56:20 +0200 Subject: 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 --- sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sources/pyside2/PySide2/QtOpenGLFunctions') diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt index 72b3a16ca..eab543b6a 100644 --- a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt +++ b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt @@ -2,7 +2,8 @@ project(QtOpenGLFunctions) set(QtOpenGLFunctions_DROPPED_ENTRIES) -get_property(QtOpenGLFunctions_enabled_features TARGET Qt5::Gui PROPERTY INTERFACE_QT_ENABLED_FEATURES) +get_property(QtOpenGLFunctions_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui + PROPERTY INTERFACE_QT_ENABLED_FEATURES) set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_wrapper.cpp) @@ -13,7 +14,7 @@ if(_opengles2Index GREATER -1) list(APPEND QtOpenGLFunctions_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery) list(APPEND QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp) - message(STATUS "Qt5OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)") + message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)") else() list(APPEND QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_0_wrapper.cpp @@ -42,7 +43,7 @@ else() ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp) - message(STATUS "Qt5OpenGLFunctions: Adding Desktop OpenGL classes") + message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Adding Desktop OpenGL classes") endif() configure_file("${QtOpenGLFunctions_SOURCE_DIR}/QtOpenGLFunctions_global.post.h.in" @@ -51,14 +52,14 @@ configure_file("${QtOpenGLFunctions_SOURCE_DIR}/QtOpenGLFunctions_global.post.h. set(QtOpenGLFunctions_include_dirs ${QtGOpenGLFunctions_SOURCE_DIR} ${QtOpenGLFunctions_BINARY_DIR} ${pyside2_SOURCE_DIR} - ${Qt5Core_INCLUDE_DIRS} - ${Qt5Gui_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS} ${libpyside_SOURCE_DIR} ${QtCore_GEN_DIR} ${QtGui_GEN_DIR} ) set(QtOpenGLFunctions_libraries pyside2 - ${Qt5Gui_LIBRARIES}) + ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}) set(QtOpenGLFunctions_deps QtGui) -- cgit v1.2.3