diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-10 13:08:20 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-10 14:26:35 +0100 |
| commit | b35ab123dff10c6c0a3b65b7c8865a6ed054c923 (patch) | |
| tree | 0e67d10e87473232c1f843a6f69148872ba16420 /sources/pyside6 | |
| parent | 9f8fc934818c3ae7473fe6258056bc7c7bf9f718 (diff) | |
CMake: Use CMAKE_AUTOMOC
As a drive by, clean up an old Qt 5 path.
Change-Id: I98c357ce6cc09ca1d02b0fb60617652c143c1fc8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6')
| -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) |
