diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index b52c994c5e..c43210c2f4 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -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 diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 8da9710cc6..3776fe63c1 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -45,7 +45,9 @@ #include #include #include -#include +#if QT_CONFIG(cpp_winrt) +# include +#endif #include #include