Files
gentoo/sci-libs/jkqtplotter/files/jkqtplotter-5.0.0_beta1-qt6.patch
Nicolas PARLANT 270e046570 sci-libs/jkqtplotter: add 5.0.0_beta1
Same content as the pre-version in tree, but finally tagged as beta1
to facilitate packaging in distribs (use in avogadrolibs)

add a patch to avoid Qt5

Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/45115
Signed-off-by: Sam James <sam@gentoo.org>
2025-12-30 13:17:34 +00:00

19 lines
737 B
Diff

see https://bugs.gentoo.org/966047
PR pending https://github.com/jkriege2/JKQtPlotter/pull/156.patch
avoid Qt5 automagic, respect an exported value of QT_VERSION_MAJOR
--- a/cmake/jkqtplotter_common_qtsettings.cmake
+++ b/cmake/jkqtplotter_common_qtsettings.cmake
@@ -4,7 +4,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
+if(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()
if(QT_VERSION_MAJOR LESS 5)
message(FATAL_ERROR "Minimum supported Qt version is 5, but you are trying to compile against Qt${QT_VERSION_MAJOR}")