diff options
-rw-r--r-- | src/gui/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/gui/util/qgraphicsframecapture.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index b67480d22f..e848ac23c3 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -439,7 +439,7 @@ if(QT_FEATURE_graphicsframecapture) util/qgraphicsframecapture_p_p.h ) - qt_internal_extend_target(Gui CONDITION WIN32 OR (UNIX AND NOT APPLE) + qt_internal_extend_target(Gui CONDITION (WIN32 OR (UNIX AND NOT APPLE)) AND QT_FEATURE_library LIBRARIES RenderDoc::RenderDoc SOURCES diff --git a/src/gui/util/qgraphicsframecapture.cpp b/src/gui/util/qgraphicsframecapture.cpp index 4e72f4217b..a34a4697c5 100644 --- a/src/gui/util/qgraphicsframecapture.cpp +++ b/src/gui/util/qgraphicsframecapture.cpp @@ -2,10 +2,12 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qgraphicsframecapture_p.h" -#if defined (Q_OS_WIN) || defined(Q_OS_LINUX) +#if (defined (Q_OS_WIN) || defined(Q_OS_LINUX)) && QT_CONFIG(library) #include "qgraphicsframecapturerenderdoc_p_p.h" #elif defined(Q_OS_MACOS) || defined(Q_OS_IOS) #include "qgraphicsframecapturemetal_p_p.h" +#else +#include "qgraphicsframecapture_p_p.h" #endif #include <QtCore/qstandardpaths.h> @@ -24,7 +26,7 @@ QGraphicsFrameCapturePrivate::QGraphicsFrameCapturePrivate() QGraphicsFrameCapture::QGraphicsFrameCapture() { -#if defined (Q_OS_WIN) || defined(Q_OS_LINUX) +#if (defined (Q_OS_WIN) || defined(Q_OS_LINUX)) && QT_CONFIG(library) d.reset(new QGraphicsFrameCaptureRenderDoc); #elif defined(Q_OS_MACOS) || defined(Q_OS_IOS) d.reset(new QGraphicsFrameCaptureMetal); |