mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-10-18 11:10:05 +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)
|
add_definitions(-DSPIRV_WINDOWS)
|
||||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||||
add_definitions(-DSPIRV_MAC)
|
add_definitions(-DSPIRV_MAC)
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
|
||||||
|
add_definitions(-DSPIRV_ANDROID)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Your platform '${CMAKE_SYSTEM_NAME}' is not supported!")
|
message(FATAL_ERROR "Your platform '${CMAKE_SYSTEM_NAME}' is not supported!")
|
||||||
endif()
|
endif()
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
|
||||||
#if defined(SPIRV_LINUX) || defined(SPIRV_MAC)
|
#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC)
|
||||||
namespace libspirv {
|
namespace libspirv {
|
||||||
|
|
||||||
clr::reset::operator const char*() { return "\x1b[0m"; }
|
clr::reset::operator const char*() { return "\x1b[0m"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user