This enables cross-compiling to Android using scripts like
cmake-android that update the system name to reflect the build
target.
add_definitions(-DSPIRV_WINDOWS)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
add_definitions(-DSPIRV_MAC)
+elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
+ add_definitions(-DSPIRV_ANDROID)
else()
message(FATAL_ERROR "Your platform '${CMAKE_SYSTEM_NAME}' is not supported!")
endif()
#include "print.h"
-#if defined(SPIRV_LINUX) || defined(SPIRV_MAC)
+#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC)
namespace libspirv {
clr::reset::operator const char*() { return "\x1b[0m"; }