Support building on FreeBSD

This commit is contained in:
rdb 2017-05-28 23:19:58 +02:00
parent 3bea99d378
commit ddf4de61c9
2 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
add_definitions(-DSPIRV_MAC)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
add_definitions(-DSPIRV_ANDROID)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
add_definitions(-DSPIRV_FREEBSD)
else()
message(FATAL_ERROR "Your platform '${CMAKE_SYSTEM_NAME}' is not supported!")
endif()

View File

@ -14,7 +14,7 @@
#include "print.h"
#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC)
#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || defined(SPIRV_FREEBSD)
namespace libspirv {
clr::reset::operator const char*() { return "\x1b[0m"; }