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>
commit1218fca26ee875f3c42b65142b276042a817b85a
parent84aed03bb822e324b45a821ce48acc57a4fca234
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeThu, 30 Jul 2026 15:14:00 +0000