From 6b806ba3a02afdf646ece58cf4d32060611998fd Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Fri, 28 Oct 2022 19:57:26 -0700 Subject: [PATCH] cmake: only find OpenGLWidgets on qt6 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 556db474d..c793ca083 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,6 @@ set(QT_LIBRARIES OpenGL LinguistTools Concurrent - OpenGLWidgets ) if (UNIX AND NOT APPLE) list(APPEND QT_LIBRARIES DBus) @@ -131,6 +130,11 @@ list(APPEND OLIVE_LIBRARIES ) if (${QT_VERSION_MAJOR} EQUAL "6") + find_package(Qt${QT_VERSION_MAJOR} + REQUIRED + OpenGLWidgets + ) + list(APPEND OLIVE_LIBRARIES Qt${QT_VERSION_MAJOR}::OpenGLWidgets )