aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/pysidetest/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/pysidetest/CMakeLists.txt')
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt19
1 files changed, 9 insertions, 10 deletions
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
index 0dbd2b7cf..361f7d541 100644
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
@@ -1,11 +1,14 @@
project(pysidetest)
project(testbinding)
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
set(QT_USE_QTCORE 1)
# no more supported: include(${QT_USE_FILE})
-add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
+
+# removed after qtbase/054b66a65748c9ebfafeca88bf31669a24994237, is this required?
+# add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
+
add_definitions(-DQT_SHARED)
add_definitions(-DRXX_ALLOCATOR_INIT_0)
@@ -25,11 +28,7 @@ testview.h
hiddenobject.h
)
-if (${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- qt6_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
-else()
- qt5_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
-endif()
+qt_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
set(testbinding_SRC
${CMAKE_CURRENT_BINARY_DIR}/testbinding/flagsnamespace_classforenum_wrapper.cpp
@@ -51,9 +50,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp
# Thus we use the second direct path, which contains the actual header files.
if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- set(Qt6Core_DIRECT_INCLUDE_DIR Qt6Core_INCLUDE_DIRS)
- set(Qt6Gui_DIRECT_INCLUDE_DIR Qt6Gui_INCLUDE_DIRS)
- set(Qt6Widgets_DIRECT_INCLUDE_DIR Qt6Widgets_INCLUDE_DIRS)
+ set(Qt6Core_DIRECT_INCLUDE_DIR ${Qt6Core_INCLUDE_DIRS})
+ set(Qt6Gui_DIRECT_INCLUDE_DIR ${Qt6Gui_INCLUDE_DIRS})
+ set(Qt6Widgets_DIRECT_INCLUDE_DIR ${Qt6Widgets_INCLUDE_DIRS})
else()
list(GET Qt5Core_INCLUDE_DIRS 1 Qt5Core_DIRECT_INCLUDE_DIR)
list(GET Qt5Gui_INCLUDE_DIRS 1 Qt5Gui_DIRECT_INCLUDE_DIR)