geode/cmake/PlatformDetect.cmake

19 lines
No EOL
534 B
CMake

if (NOT DEFINED GEODE_TARGET_PLATFORM)
if(APPLE)
if(IOS)
set(GEODE_TARGET_PLATFORM "iOS")
else()
set(GEODE_TARGET_PLATFORM "MacOS")
endif()
elseif(WIN32)
set(GEODE_TARGET_PLATFORM "Win64")
elseif(ANDROID)
if (ANDROID_ABI STREQUAL "arm64-v8a")
set(GEODE_TARGET_PLATFORM "Android64")
elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
set(GEODE_TARGET_PLATFORM "Android32")
endif()
else()
message(FATAL_ERROR "Unable to detect platform, please set GEODE_TARGET_PLATFORM in the root CMake file.")
endif()
endif()