diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-02 21:34:09 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-10 12:19:14 +0200 |
commit | e58158c3cd629717a9742fe08da9b09ed39bc198 (patch) | |
tree | 8ed7c850c17f698df8837429f20a16a8a41a153f /libraries/rainbow | |
parent | ff2cd50bfaeaab89ab830f1223c1e3649642dfa3 (diff) | |
download | PrismLauncher-e58158c3cd629717a9742fe08da9b09ed39bc198.tar.gz PrismLauncher-e58158c3cd629717a9742fe08da9b09ed39bc198.tar.bz2 PrismLauncher-e58158c3cd629717a9742fe08da9b09ed39bc198.zip |
feat: add Qt 6 support to CMake
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'libraries/rainbow')
-rw-r--r-- | libraries/rainbow/CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libraries/rainbow/CMakeLists.txt b/libraries/rainbow/CMakeLists.txt index 94cc1b49..b6bbe710 100644 --- a/libraries/rainbow/CMakeLists.txt +++ b/libraries/rainbow/CMakeLists.txt @@ -1,8 +1,11 @@ cmake_minimum_required(VERSION 3.9.4) project(rainbow) -find_package(Qt5Core REQUIRED QUIET) -find_package(Qt5Gui REQUIRED QUIET) +if(QT_VERSION_MAJOR EQUAL 5) + find_package(Qt5 COMPONENTS Core Gui REQUIRED) +elseif(Launcher_QT_VERSION_MAJOR EQUAL 6) + find_package(Qt6 COMPONENTS Core Gui REQUIRED) +endif() set(RAINBOW_SOURCES src/rainbow.cpp @@ -11,4 +14,4 @@ src/rainbow.cpp add_library(Launcher_rainbow STATIC ${RAINBOW_SOURCES}) target_include_directories(Launcher_rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") -target_link_libraries(Launcher_rainbow Qt5::Core Qt5::Gui) +target_link_libraries(Launcher_rainbow Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui) |