aboutsummaryrefslogtreecommitdiff
path: root/libraries/classparser
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/classparser
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/classparser')
-rw-r--r--libraries/classparser/CMakeLists.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/libraries/classparser/CMakeLists.txt b/libraries/classparser/CMakeLists.txt
index fc510e68..05412c30 100644
--- a/libraries/classparser/CMakeLists.txt
+++ b/libraries/classparser/CMakeLists.txt
@@ -10,10 +10,11 @@ if(${BIGENDIAN})
endif(${BIGENDIAN})
# Find Qt
-find_package(Qt5Core REQUIRED)
-
-# Include Qt headers.
-include_directories(${Qt5Base_INCLUDE_DIRS})
+if(QT_VERSION_MAJOR EQUAL 5)
+ find_package(Qt5 COMPONENTS Core REQUIRED)
+elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
+ find_package(Qt6 COMPONENTS Core REQUIRED)
+endif()
set(CLASSPARSER_HEADERS
# Public headers
@@ -38,4 +39,4 @@ add_definitions(-DCLASSPARSER_LIBRARY)
add_library(Launcher_classparser STATIC ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS})
target_include_directories(Launcher_classparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
-target_link_libraries(Launcher_classparser QuaZip::QuaZip Qt5::Core)
+target_link_libraries(Launcher_classparser QuaZip::QuaZip Qt${QT_VERSION_MAJOR}::Core)