I am bit confused about which of PLATFORM_ID vs. WIN32 vs. CMAKE_SYSTEM_NAME to use.
My build system supports Windows and macOS, so it looks like:
- for normal branching in the CMake scripts, I have the choice between CMAKE_SYSTEM_NAME=“Windows/Darwin” and the variables WIN32/APPLE
- in generator expressions, I have the choice between PLATFORM_ID and WIN32/APPLE
WIN32/APPLE has the advantage of being universal in this context, but they look like legacy variables and not very clean (APPLE could also mean iOS, WIN32 is also true for Windows 64bit).
What’s the modern way to do this?