diff options
| -rw-r--r-- | sources/pyside6/plugins/uitools/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | sources/pyside6/tests/pysidetest/CMakeLists.txt | 25 |
2 files changed, 7 insertions, 22 deletions
diff --git a/sources/pyside6/plugins/uitools/CMakeLists.txt b/sources/pyside6/plugins/uitools/CMakeLists.txt index c3cd416a5..b24d5f9d7 100644 --- a/sources/pyside6/plugins/uitools/CMakeLists.txt +++ b/sources/pyside6/plugins/uitools/CMakeLists.txt @@ -14,9 +14,7 @@ set(ui_plugin_src customwidget.cpp ) -qt_wrap_cpp(MOC_FILES ${ui_plugin_moc}) - -add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES}) +add_library(uiplugin STATIC ${ui_plugin_src}) if(CMAKE_HOST_UNIX AND NOT CYGWIN) add_definitions(-fPIC) endif() diff --git a/sources/pyside6/tests/pysidetest/CMakeLists.txt b/sources/pyside6/tests/pysidetest/CMakeLists.txt index f80eff134..399751afd 100644 --- a/sources/pyside6/tests/pysidetest/CMakeLists.txt +++ b/sources/pyside6/tests/pysidetest/CMakeLists.txt @@ -9,6 +9,8 @@ set(QT_USE_QTCORE 1) # removed after qtbase/054b66a65748c9ebfafeca88bf31669a24994237, is this required? # add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS}) +set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_SHARED) add_definitions(-DRXX_ALLOCATOR_INIT_0) @@ -21,15 +23,6 @@ testview.cpp hiddenobject.cpp ) -set(pysidetest_MOC_HEADERS -flagstest.h -testobject.h -testview.h -hiddenobject.h -) - -qt_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS}) - set(testbinding_SRC ${CMAKE_CURRENT_BINARY_DIR}/testbinding/flagsnamespace_classforenum_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testobject_wrapper.cpp @@ -49,15 +42,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp # ./qt/lib/QtCore.framework; ./qt/lib/QtCore.framework/Headers ; ./qt/mkspecs/macx-clang # 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}) -else() - list(GET Qt5Core_INCLUDE_DIRS 1 Qt5Core_DIRECT_INCLUDE_DIR) - list(GET Qt5Gui_INCLUDE_DIRS 1 Qt5Gui_DIRECT_INCLUDE_DIR) - list(GET Qt5Widgets_INCLUDE_DIRS 1 Qt5Widgets_DIRECT_INCLUDE_DIR) -endif() +set(Qt6Core_DIRECT_INCLUDE_DIR ${Qt6Core_INCLUDE_DIRS}) +set(Qt6Gui_DIRECT_INCLUDE_DIR ${Qt6Gui_INCLUDE_DIRS}) +set(Qt6Widgets_DIRECT_INCLUDE_DIR ${Qt6Widgets_INCLUDE_DIRS}) # Adjust include headers paths for frameworks. set(shiboken_framework_include_dirs_option "") @@ -106,7 +93,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${QtWidgets_GEN_DIR} ${libpyside_SOURCE_DIR}) -add_library(pysidetest SHARED ${pysidetest_SRC} ${pysidetest_MOC_SRC}) +add_library(pysidetest SHARED ${pysidetest_SRC}) set_target_properties(pysidetest PROPERTIES DEFINE_SYMBOL BUILD_PYSIDETEST) |
