aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-29 14:42:24 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-29 17:57:32 +0100
commitc199b64bcbcaeb55ce78ce3f4e772fcdc68073f4 (patch)
tree4c0a2f4adbe9091d07c75ded35c3547b2702892d /sources/pyside6
parentb9af02ccb123be3ec4d7ec47b592b3722e7eb1bf (diff)
Build system: Use modern form of finding and linking Qt libraries
Pick-to: 6.4 Task-number: PYSIDE-962 Change-Id: I91aed62a8e14bbc1101b4f23e25f57a5d6bca173 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/CMakeLists.txt2
-rw-r--r--sources/pyside6/cmake/PySideSetup.cmake6
-rw-r--r--sources/pyside6/plugins/designer/CMakeLists.txt5
-rw-r--r--sources/pyside6/plugins/uitools/CMakeLists.txt5
-rw-r--r--sources/pyside6/tests/pysidetest/CMakeLists.txt11
5 files changed, 9 insertions, 20 deletions
diff --git a/sources/pyside6/CMakeLists.txt b/sources/pyside6/CMakeLists.txt
index 7dd242828..f73133fa1 100644
--- a/sources/pyside6/CMakeLists.txt
+++ b/sources/pyside6/CMakeLists.txt
@@ -16,7 +16,7 @@ endif()
if(Qt${QT_MAJOR_VERSION}UiTools_FOUND)
add_subdirectory(plugins/uitools)
- find_package(Qt${QT_MAJOR_VERSION}Designer)
+ find_package(Qt6 COMPONENTS Designer)
# PYSIDE-535: Enable when PyPy supports embedding
if (Qt${QT_MAJOR_VERSION}Designer_FOUND AND NOT PYPY_VERSION)
add_subdirectory(plugins/designer)
diff --git a/sources/pyside6/cmake/PySideSetup.cmake b/sources/pyside6/cmake/PySideSetup.cmake
index 43d042aef..a4ec74d44 100644
--- a/sources/pyside6/cmake/PySideSetup.cmake
+++ b/sources/pyside6/cmake/PySideSetup.cmake
@@ -90,7 +90,7 @@ if(QFP_QT_HOST_PATH)
endif()
endif()
endif()
-find_package(Qt${QT_MAJOR_VERSION} 6.0 REQUIRED COMPONENTS Core)
+find_package(Qt6 REQUIRED COMPONENTS Core)
add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
@@ -177,7 +177,7 @@ foreach(m ${DISABLED_MODULES})
endforeach()
# Whether to add libpysideqml
-find_package(Qt${QT_MAJOR_VERSION}Qml)
+find_package(Qt6 COMPONENTS Qml)
string(REGEX MATCHALL "[0-9]+" qt_version_helper "${Qt${QT_MAJOR_VERSION}Core_VERSION}")
@@ -227,5 +227,5 @@ if(SANITIZE_ADDRESS AND NOT MSVC)
setup_sanitize_address()
endif()
-find_package(Qt${QT_MAJOR_VERSION}Designer)
+find_package(Qt6 COMPONENTS Designer)
diff --git a/sources/pyside6/plugins/designer/CMakeLists.txt b/sources/pyside6/plugins/designer/CMakeLists.txt
index 50074be51..f1b7f83b3 100644
--- a/sources/pyside6/plugins/designer/CMakeLists.txt
+++ b/sources/pyside6/plugins/designer/CMakeLists.txt
@@ -7,10 +7,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS UiPlugin)
+find_package(Qt6 COMPONENTS Core Gui Widgets UiPlugin)
qt_add_plugin(PySidePlugin)
diff --git a/sources/pyside6/plugins/uitools/CMakeLists.txt b/sources/pyside6/plugins/uitools/CMakeLists.txt
index ee56cfa2c..b6e6502d2 100644
--- a/sources/pyside6/plugins/uitools/CMakeLists.txt
+++ b/sources/pyside6/plugins/uitools/CMakeLists.txt
@@ -4,10 +4,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS UiPlugin)
+find_package(Qt6 COMPONENTS Core Gui Widgets UiPlugin)
set(ui_plugin_src
customwidgets.cpp
diff --git a/sources/pyside6/tests/pysidetest/CMakeLists.txt b/sources/pyside6/tests/pysidetest/CMakeLists.txt
index d0932509e..3965455c9 100644
--- a/sources/pyside6/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside6/tests/pysidetest/CMakeLists.txt
@@ -14,7 +14,7 @@ set(CMAKE_AUTOMOC ON)
add_definitions(-DQT_SHARED)
add_definitions(-DRXX_ALLOCATOR_INIT_0)
-find_package(Qt${QT_MAJOR_VERSION}Widgets)
+find_package(Qt6 COMPONENTS QtWidgets)
set(pysidetest_SRC
containertest.cpp
@@ -110,10 +110,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 "")
@@ -126,9 +123,7 @@ target_link_libraries(testbinding
pysidetest
pyside6
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)