Update cmake files to support Android as a build target.

This enables cross-compiling to Android using scripts like
cmake-android that update the system name to reflect the build
target.
This commit is contained in:
Derek Sollenberger 2016-04-18 10:59:47 -04:00 committed by Andrew Woloszyn
parent 552d319962
commit 009c4358b5
2 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
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()

View File

@ -26,7 +26,7 @@
#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"; }