mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
if QT_VERSION_MAJOR is defined, use this version instead of searching again. Labplot does not support Qt6 yet and therefore the version is set manually in the project. If Qt5 and Qt6 are installed, QAd overwrites the Qt5 requirement and then the configuration of the project does not work (#504)
This commit is contained in:
parent
cb24317010
commit
c6595563af
@ -1,6 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(QtAdvancedDockingSystem LANGUAGES CXX VERSION ${VERSION_SHORT})
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
if (${QT_VERSION_MAJOR})
|
||||
message(STATUS "Forced to use Qt version ${QT_VERSION_MAJOR}")
|
||||
find_package(QT NAMES Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
else()
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
endif()
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets REQUIRED)
|
||||
if (UNIX AND NOT APPLE)
|
||||
include_directories(${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
|
||||
|
Loading…
Reference in New Issue
Block a user