I am working on a CMake build script that requires the ARM embedded toolchain. Depending on the user's OS and CPU architecture, a different version of the toolkit needs to be downloaded. This is fine when only differentiating OSs, as I can do something like the following:
if(WIN32)
# link to Windows version
elseif(APPLE)
# link to Apple version
elseif(LINUX)
# link to Linux version
However, the toolkit for Apple Silicon is different from Intel MacBooks, and CMAKE_SYSTEM_PROCESSOR
and other similar variables all seem empty, so they are of no use, so I cannot differentiate Apple Silicon from Intel chips.
Is there a way around this?