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>
This commit is contained in:
Tasuku Suzuki 2023-10-21 10:57:57 +09:00
parent ea0b99c006
commit a86fda6423
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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);