diff options
author | Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp> | 2023-10-21 10:57:57 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp> | 2023-10-25 08:37:23 +0900 |
commit | a86fda64232722949ce47117291c0b3831e0f37c (patch) | |
tree | 2f15504205bfc8f241f26aa53d0fcc41742c121c /src | |
parent | ea0b99c0064806397081a6f19a2af56abea726de (diff) |
Fix build with -no-feature-library
Change-Id: Ief76068a37d32759666e3aa2a24f126f18eca88b
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Diffstat (limited to 'src')
-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); |