aboutsummaryrefslogtreecommitdiff
path: root/libraries/LocalPeer
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-05-02 21:34:09 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-07-10 12:19:14 +0200
commite58158c3cd629717a9742fe08da9b09ed39bc198 (patch)
tree8ed7c850c17f698df8837429f20a16a8a41a153f /libraries/LocalPeer
parentff2cd50bfaeaab89ab830f1223c1e3649642dfa3 (diff)
downloadPrismLauncher-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/LocalPeer')
-rw-r--r--libraries/LocalPeer/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/libraries/LocalPeer/CMakeLists.txt b/libraries/LocalPeer/CMakeLists.txt
index 0b434803..b736cefc 100644
--- a/libraries/LocalPeer/CMakeLists.txt
+++ b/libraries/LocalPeer/CMakeLists.txt
@@ -1,7 +1,12 @@
cmake_minimum_required(VERSION 3.9.4)
project(LocalPeer)
-find_package(Qt5 COMPONENTS Core Network REQUIRED)
+if(QT_VERSION_MAJOR EQUAL 5)
+ find_package(Qt5 COMPONENTS Core Network REQUIRED)
+elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
+ find_package(Qt6 COMPONENTS Core Network Core5Compat REQUIRED)
+ list(APPEND LocalPeer_LIBS Qt${QT_VERSION_MAJOR}::Core5Compat)
+endif()
set(SINGLE_SOURCES
src/LocalPeer.cpp
@@ -25,4 +30,4 @@ endif()
add_library(LocalPeer STATIC ${SINGLE_SOURCES})
target_include_directories(LocalPeer PUBLIC include)
-target_link_libraries(LocalPeer Qt5::Core Qt5::Network)
+target_link_libraries(LocalPeer Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network ${LocalPeer_LIBS})