mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-24 16:51:06 +00:00
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:
parent
552d319962
commit
009c4358b5
@ -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()
|
||||
|
@ -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"; }
|
||||
|
Loading…
Reference in New Issue
Block a user