From 8428c59318b250058e6cf93353e2871072bbf7f9 Mon Sep 17 00:00:00 2001 From: NissimBendanan <121024835+NissimBendanan@users.noreply.github.com> Date: Sun, 23 Apr 2023 20:27:41 +0300 Subject: [PATCH] find package also for Qt6 (#574) fix linuxdeployqt makefile: use Qt${QT_VERSION_MAJOR} instead of Qt5 --- tools/linuxdeployqt/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/linuxdeployqt/CMakeLists.txt b/tools/linuxdeployqt/CMakeLists.txt index e7af15a6..e4b68927 100644 --- a/tools/linuxdeployqt/CMakeLists.txt +++ b/tools/linuxdeployqt/CMakeLists.txt @@ -9,7 +9,7 @@ add_definitions("-DLINUXDEPLOYQT_GIT_COMMIT=\"${GIT_COMMIT}\"") add_definitions("-DBUILD_DATE=\"${DATE}\"") add_definitions("-DBUILD_NUMBER=\"${BUILD_NUMBER}\"") -find_package(Qt5 REQUIRED COMPONENTS Core) +find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) # update excludelist message(STATUS "Updating excludelist...") @@ -26,5 +26,5 @@ mark_as_advanced(EXCLUDELIST EXCLUDELIST_RESULT) add_executable(linuxdeployqt main.cpp shared.cpp) target_include_directories(linuxdeployqt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(linuxdeployqt Qt5::Core) +target_link_libraries(linuxdeployqt Qt${QT_VERSION_MAJOR}::Core) target_compile_definitions(linuxdeployqt PRIVATE -DEXCLUDELIST="${EXCLUDELIST}")