From 9cc9792054f79d330436fd7887f03c4f71e51f86 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Sat, 23 Jan 2021 10:21:55 +0100 Subject: [PATCH] some bug fixing in the cmake chain concerning the new Qt6 stuff. --- CMakeLists.txt | 18 ++++++++++-------- src/CMakeLists.txt | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a01732a9..6e4ead4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,14 +123,16 @@ if (qt_based_tools) find_package(Qt6PrintSupport CONFIG REQUIRED) endif (Qt6Core_FOUND) # try Qt5 - find_package(Qt5Core) - if (NOT Qt5Core_FOUND) - find_package(Qt5Widgets CONFIG REQUIRED) - find_package(Qt5Xml CONFIG REQUIRED) - find_package(Qt5Network CONFIG REQUIRED) - find_package(Qt5Svg CONFIG REQUIRED) - find_package(Qt5PrintSupport CONFIG REQUIRED) - endif (NOT Qt5Core_FOUND) + if (NOT Qt6Core_FOUND) + find_package(Qt5Core) + if (Qt5Core_FOUND) + find_package(Qt5Widgets CONFIG REQUIRED) + find_package(Qt5Xml CONFIG REQUIRED) + find_package(Qt5Network CONFIG REQUIRED) + find_package(Qt5Svg CONFIG REQUIRED) + find_package(Qt5PrintSupport CONFIG REQUIRED) + endif (Qt5Core_FOUND) + endif (NOT Qt6Core_FOUND) # if Qt6 and Qt5 is not found, try Qt4 if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1a8cc977..96886325 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,7 +9,7 @@ elseif (Qt4_FOUND) add_subdirectory(musredit) elseif (QT_FOUND) add_subdirectory(musrgui) -endif (Qt5Core_FOUND) +endif () #--- define the musrfit libs -------------------------------------------------- set(MUSRFIT_LIBS ${MUSRFIT_LIBS} mud)