aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/CMakeLists.txt')
-rw-r--r--sources/shiboken2/ApiExtractor/CMakeLists.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
index 65150eb92..de6bf019f 100644
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
@@ -30,8 +30,8 @@ parser/enumvalue.cpp
xmlutils.cpp
)
-find_package(Qt5XmlPatterns 5.12)
-find_package(Qt5Xml 5.12)
+find_package(Qt${QT_MAJOR_VERSION}XmlPatterns 5.12)
+find_package(Qt${QT_MAJOR_VERSION}Xml 5.12)
find_package(LibXml2 2.6.32)
find_package(LibXslt 1.1.19)
@@ -40,7 +40,7 @@ if (LIBXSLT_FOUND AND LIBXML2_FOUND)
set(HAS_LIBXSLT 1)
endif()
-if(NOT Qt5XmlPatterns_FOUND AND NOT HAS_LIBXSLT)
+if(NOT Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND AND NOT HAS_LIBXSLT)
set(DISABLE_DOCSTRINGS TRUE)
message(WARNING
"Documentation will not be built due to missing dependency (no Qt5XmlPatterns found).")
@@ -54,7 +54,7 @@ target_include_directories(apiextractor PRIVATE ${CLANG_EXTRA_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/parser)
-target_link_libraries(apiextractor PUBLIC Qt5::Core)
+target_link_libraries(apiextractor PUBLIC Qt${QT_MAJOR_VERSION}::Core)
target_link_libraries(apiextractor PRIVATE ${CLANG_EXTRA_LIBRARIES})
if (HAS_LIBXSLT)
@@ -66,10 +66,10 @@ if (HAS_LIBXSLT)
PRIVATE ${LIBXSLT_LIBRARIES} ${LIBXML2_LIBRARIES})
endif()
-if (Qt5XmlPatterns_FOUND)
+if (Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND)
target_compile_definitions(apiextractor PUBLIC HAVE_QTXMLPATTERNS)
target_sources(apiextractor PRIVATE xmlutils_qt.cpp)
- target_link_libraries(apiextractor PUBLIC Qt5::Xml Qt5::XmlPatterns)
+ target_link_libraries(apiextractor PUBLIC Qt${QT_MAJOR_VERSION}::Xml Qt${QT_MAJOR_VERSION}::XmlPatterns)
endif()
if (NOT DISABLE_DOCSTRINGS)
@@ -87,7 +87,7 @@ target_compile_definitions(apiextractor PRIVATE CMAKE_CXX_COMPILER="${CMAKE_CXX_
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/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(Qt5Test 5.12 REQUIRED)
+ find_package(Qt${QT_MAJOR_VERSION}Test 5.12 REQUIRED)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests)
enable_testing()
add_subdirectory(tests)