From 35d7a4d828630c977d8a0f7b029f541468eebb1c Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 30 Mar 2021 21:25:41 -0500 Subject: [PATCH] [QDark] Make portable between Qt5 and Qt6 --- deps/QDark/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deps/QDark/CMakeLists.txt b/deps/QDark/CMakeLists.txt index 3272bbfe..5afaa80b 100644 --- a/deps/QDark/CMakeLists.txt +++ b/deps/QDark/CMakeLists.txt @@ -1,5 +1,6 @@ -find_package(Qt6Widgets REQUIRED) +find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) @@ -17,6 +18,6 @@ target_include_directories( target_link_libraries( QDarkStyle - Qt6::Widgets + Qt${QT_VERSION_MAJOR}::Widgets )