cmake: use a more appropriate feature guard

The factory cache registration functionality should belong to the
cppwinrt feature, so guard it with appropriate QT_FEATURE_ guard.

Change-Id: Icbadaa7ffb32a4e47fe3bbab90c37303fd787344
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Yuhang Zhao 2023-10-08 09:44:54 +08:00
parent a1e052a291
commit 09953c4332
2 changed files with 4 additions and 2 deletions

View File

@ -1013,7 +1013,7 @@ qt_internal_extend_target(Core CONDITION ANDROID
# place to put them.
)
qt_internal_extend_target(Core CONDITION WIN32
qt_internal_extend_target(Core CONDITION QT_FEATURE_cpp_winrt
SOURCES
platform/windows/qfactorycacheregistration_p.h
platform/windows/qfactorycacheregistration.cpp

View File

@ -45,7 +45,9 @@
#include <QtCore/qscopedpointer.h>
#include <QtCore/quuid.h>
#include <QtCore/private/qwinregistry_p.h>
#include <QtCore/private/qfactorycacheregistration_p.h>
#if QT_CONFIG(cpp_winrt)
# include <QtCore/private/qfactorycacheregistration_p.h>
#endif
#include <QtCore/private/qsystemerror_p.h>
#include <QtGui/private/qwindowsguieventdispatcher_p.h>