Use CMAKE_HOST_SYSTEM_NAME instead of PLATFORM_NAME.