CMake: Fix simulationserver external project MINGW linking error
When building examples as external projects, the simulationserver
example fails to link on MINGW.
The error is:
ld.exe: open62541.c.obj: in function `setMulticastInterface':
undefined reference to `GetAdaptersAddresses'
In a non-external project build, this was previously handled by the
'GCC' check. But this is an Qt internal CMake variable that is not set
for public projects, and thus neither for external project examples.
Make sure to check the CMAKE_CXX_COMPILER_ID variable instead, which
is set by CMake for all projects.
This makes sure to link to the iphlpapi library on MINGW in an
external project scenario.
Pick-to: 6.12
Change-Id: I8761192fe798b5486bb070880c4e07fd7befd98d
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>