diff options
Diffstat (limited to 'sources/pyside6/tests/pysidetest/CMakeLists.txt')
-rw-r--r-- | sources/pyside6/tests/pysidetest/CMakeLists.txt | 66 |
1 files changed, 39 insertions, 27 deletions
diff --git a/sources/pyside6/tests/pysidetest/CMakeLists.txt b/sources/pyside6/tests/pysidetest/CMakeLists.txt index 7717fc8c6..38f42f342 100644 --- a/sources/pyside6/tests/pysidetest/CMakeLists.txt +++ b/sources/pyside6/tests/pysidetest/CMakeLists.txt @@ -1,7 +1,10 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + project(pysidetest) project(testbinding) -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.18) set(QT_USE_QTCORE 1) # no more supported: include(${QT_USE_FILE}) @@ -14,14 +17,18 @@ set(CMAKE_AUTOMOC ON) add_definitions(-DQT_SHARED) add_definitions(-DRXX_ALLOCATOR_INIT_0) -find_package(Qt${QT_MAJOR_VERSION}Widgets) +find_package(Qt6 REQUIRED COMPONENTS Widgets) set(pysidetest_SRC -containertest.cpp -flagstest.cpp -testobject.cpp -testview.cpp -hiddenobject.cpp +containertest.cpp containertest.h +flagstest.cpp flagstest.h +hiddenobject.cpp hiddenobject.h +pysidetest_global.h +pysidetest_macros.h +sharedpointertestbench.cpp sharedpointertestbench.h +testobject.cpp testobject.h +testview.cpp testview.h +testqvariantenum.cpp testqvariantenum.h ) set(testbinding_SRC @@ -33,8 +40,13 @@ ${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_testobjectwithnamespace_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_testobject2withnamespace_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp2_testobjectwithoutnamespace_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/testbinding/qsharedpointer_qobject_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/testbinding/qsharedpointer_int_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/testbinding/sharedpointertestbench_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testview_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/testbinding/testqvariantenum_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/testbinding/qvariantholder_wrapper.cpp ) # Get per module include dirs. @@ -69,10 +81,15 @@ make_path(testbinding_include_dirs ${pyside6_BINARY_DIR} make_path(testbinding_typesystem_path ${pyside6_SOURCE_DIR} ${pyside6_BINARY_DIR}) +shiboken_get_tool_shell_wrapper(shiboken tool_wrapper) + add_custom_command( -OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" - BYPRODUCTS ${testbinding_SRC} - COMMAND Shiboken6::shiboken6 ${GENERATOR_EXTRA_FLAGS} + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" + BYPRODUCTS ${testbinding_SRC} + COMMAND + ${tool_wrapper} + $<TARGET_FILE:Shiboken6::shiboken6> + ${GENERATOR_EXTRA_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h --include-paths=${testbinding_include_dirs} ${shiboken_framework_include_dirs_option} @@ -80,8 +97,8 @@ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log" --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pysidetest.xml --api-version=${SUPPORTED_QT_VERSION} -WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -COMMENT "Running generator for test binding..." + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Running generator for test binding..." ) include_directories(${CMAKE_CURRENT_SOURCE_DIR} @@ -101,10 +118,7 @@ set_target_properties(pysidetest PROPERTIES target_link_libraries(pysidetest Shiboken6::libshiboken - ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES} - ) + Qt::Core Qt::Gui Qt::Widgets) add_library(testbinding MODULE ${testbinding_SRC}) set_property(TARGET testbinding PROPERTY PREFIX "") @@ -113,47 +127,45 @@ if(WIN32) set_property(TARGET testbinding PROPERTY SUFFIX ".pyd") endif() -if(PYTHON_LIMITED_API) - set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIMITED_LIBRARIES}) -else() - set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIBRARIES}) -endif() - target_link_libraries(testbinding pysidetest pyside6 - ${TESTBINDING_PYTHON_LIBS} Shiboken6::libshiboken - ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES} - ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}) + Qt::Core Qt::Gui Qt::Widgets) add_dependencies(testbinding pyside6 QtCore QtGui QtWidgets pysidetest) create_generator_target(testbinding) PYSIDE_TEST(constructor_properties_test.py) +PYSIDE_TEST(container_test.py) PYSIDE_TEST(decoratedslot_test.py) PYSIDE_TEST(delegatecreateseditor_test.py) PYSIDE_TEST(all_modules_load_test.py) PYSIDE_TEST(bug_1016.py) -PYSIDE_TEST(embedding_test.py) PYSIDE_TEST(enum_test.py) PYSIDE_TEST(homonymoussignalandmethod_test.py) PYSIDE_TEST(iterable_test.py) PYSIDE_TEST(list_signal_test.py) PYSIDE_TEST(mixin_signal_slots_test.py) PYSIDE_TEST(modelview_test.py) +PYSIDE_TEST(multiple_inheritance_test.py) PYSIDE_TEST(new_inherited_functions_test.py) PYSIDE_TEST(notify_id.py) PYSIDE_TEST(properties_test.py) PYSIDE_TEST(property_python_test.py) +PYSIDE_TEST(snake_case_test.py) +PYSIDE_TEST(true_property_test.py) PYSIDE_TEST(qapp_like_a_macro_test.py) PYSIDE_TEST(qvariant_test.py) PYSIDE_TEST(repr_test.py) +PYSIDE_TEST(shared_pointer_test.py) PYSIDE_TEST(signal_tp_descr_get_test.py) PYSIDE_TEST(signal_slot_warning.py) PYSIDE_TEST(signalandnamespace_test.py) PYSIDE_TEST(signalemissionfrompython_test.py) +PYSIDE_TEST(signalinstance_equality_test.py) PYSIDE_TEST(signalwithdefaultvalue_test.py) PYSIDE_TEST(typedef_signal_test.py) PYSIDE_TEST(version_test.py) +PYSIDE_TEST(mock_as_slot_test.py) +PYSIDE_TEST(pyenum_relax_options_test.py) |