diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-29 14:42:24 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-29 17:57:32 +0100 |
commit | c199b64bcbcaeb55ce78ce3f4e772fcdc68073f4 (patch) | |
tree | 4c0a2f4adbe9091d07c75ded35c3547b2702892d /sources/shiboken6 | |
parent | b9af02ccb123be3ec4d7ec47b592b3722e7eb1bf (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/shiboken6')
-rw-r--r-- | sources/shiboken6/ApiExtractor/CMakeLists.txt | 5 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sources/shiboken6/cmake/ShibokenSetup.cmake | 2 | ||||
-rw-r--r-- | sources/shiboken6/generator/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sources/shiboken6/tests/dumpcodemodel/CMakeLists.txt | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/sources/shiboken6/ApiExtractor/CMakeLists.txt b/sources/shiboken6/ApiExtractor/CMakeLists.txt index 936def4a0..f3337edc8 100644 --- a/sources/shiboken6/ApiExtractor/CMakeLists.txt +++ b/sources/shiboken6/ApiExtractor/CMakeLists.txt @@ -52,7 +52,6 @@ parser/enumvalue.cpp xmlutils.cpp ) -find_package(Qt${QT_MAJOR_VERSION}Xml 6.0) find_package(LibXml2 2.6.32) find_package(LibXslt 1.1.19) @@ -75,7 +74,7 @@ target_include_directories(apiextractor PRIVATE ${CLANG_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/parser) -target_link_libraries(apiextractor PUBLIC Qt${QT_MAJOR_VERSION}::Core) +target_link_libraries(apiextractor PUBLIC Qt::Core) target_link_libraries(apiextractor PRIVATE libclang) if (HAS_LIBXSLT) @@ -100,7 +99,7 @@ target_compile_definitions(apiextractor set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) if (BUILD_TESTS) - find_package(Qt${QT_MAJOR_VERSION}Test 6.0 REQUIRED) + find_package(Qt6 REQUIRED COMPONENTS Test) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) enable_testing() add_subdirectory(tests) diff --git a/sources/shiboken6/ApiExtractor/tests/CMakeLists.txt b/sources/shiboken6/ApiExtractor/tests/CMakeLists.txt index 97ae0f850..8abc88d6f 100644 --- a/sources/shiboken6/ApiExtractor/tests/CMakeLists.txt +++ b/sources/shiboken6/ApiExtractor/tests/CMakeLists.txt @@ -15,7 +15,7 @@ macro(declare_test testname) ${CMAKE_CURRENT_BINARY_DIR} ${apiextractor_SOURCE_DIR} ) - target_link_libraries(${testname} PRIVATE apiextractor Qt${QT_MAJOR_VERSION}::Test) + target_link_libraries(${testname} PRIVATE apiextractor Qt::Test) add_test(${testname} ${testname}) if (INSTALL_TESTS) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${testname} diff --git a/sources/shiboken6/cmake/ShibokenSetup.cmake b/sources/shiboken6/cmake/ShibokenSetup.cmake index 703a72258..6f37ecc67 100644 --- a/sources/shiboken6/cmake/ShibokenSetup.cmake +++ b/sources/shiboken6/cmake/ShibokenSetup.cmake @@ -19,7 +19,7 @@ shiboken_internal_set_up_extra_dependency_paths() set(QT_MAJOR_VERSION 6) message(STATUS "Using Qt ${QT_MAJOR_VERSION}") -find_package(Qt${QT_MAJOR_VERSION} 6.0 REQUIRED COMPONENTS Core) +find_package(Qt6 REQUIRED COMPONENTS Core) if(QUIET_BUILD) set_quiet_build() diff --git a/sources/shiboken6/generator/CMakeLists.txt b/sources/shiboken6/generator/CMakeLists.txt index bac998ae5..7706c2b36 100644 --- a/sources/shiboken6/generator/CMakeLists.txt +++ b/sources/shiboken6/generator/CMakeLists.txt @@ -32,7 +32,7 @@ target_include_directories(shiboken6 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${apiextractor_SOURCE_DIR} ) -target_link_libraries(shiboken6 apiextractor Qt${QT_MAJOR_VERSION}::Core) +target_link_libraries(shiboken6 apiextractor Qt::Core) if (NOT DISABLE_DOCSTRINGS) target_sources(shiboken6 PRIVATE qtdoc/qtxmltosphinx.cpp qtdoc/qtdocgenerator.cpp) target_compile_definitions(shiboken6 PUBLIC DOCSTRINGS_ENABLED QT_LEAN_HEADERS=1) diff --git a/sources/shiboken6/tests/dumpcodemodel/CMakeLists.txt b/sources/shiboken6/tests/dumpcodemodel/CMakeLists.txt index 44652e7e5..3568b228d 100644 --- a/sources/shiboken6/tests/dumpcodemodel/CMakeLists.txt +++ b/sources/shiboken6/tests/dumpcodemodel/CMakeLists.txt @@ -9,5 +9,5 @@ target_include_directories(dumpcodemodel target_link_libraries(dumpcodemodel PRIVATE apiextractor - Qt${QT_MAJOR_VERSION}::Core + Qt::Core ) |