QtNetwork/Windows: Add exclusions for CMake Unity (Jumbo) builds

The "interface" define in windows.h causes clashes with
variables named "interface". It cannot be undef'ed
since the winsock headers also uses it.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Id2daedfd6c57aae39a1fdfe92482f17884b68ef5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
Friedemann Kleint 2023-01-27 19:20:14 +01:00
parent 25c1eaa9b1
commit 0fc1f8174f
1 changed files with 19 additions and 0 deletions

View File

@ -379,6 +379,25 @@ qt_internal_extend_target(Network CONDITION QNX PUBLIC_LIBRARIES socket) # speci
qt_internal_extend_target(Network CONDITION SOLARIS PUBLIC_LIBRARIES socket nsl) # special case
if (WIN32)
set_source_files_properties(Network # include windows.h (causing clashes with "interface" define)
kernel/qauthenticator.cpp
kernel/qdnslookup_win.cpp
kernel/qhostaddress.cpp
kernel/qhostinfo.cpp
kernel/qhostinfo_win.cpp
kernel/qnetconmonitor_win.cpp
kernel/qnetworkinterface_win.cpp
kernel/qnetworkproxy_win.cpp
socket/qabstractsocket.cpp
socket/qlocalserver.cpp
socket/qlocalserver_win.cpp
socket/qlocalsocket_win.cpp
socket/qnativesocketengine.cpp
socket/qnativesocketengine_win.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
endif()
# include the snippet projects for developer-builds
if(QT_FEATURE_private_tests)
add_subdirectory(doc/snippets/network)