Support building on FreeBSD
authorrdb <git@rdb.name>
Sun, 28 May 2017 21:19:58 +0000 (23:19 +0200)
committerrdb <git@rdb.name>
Sun, 28 May 2017 21:20:18 +0000 (23:20 +0200)
CMakeLists.txt
source/print.cpp

index b5250d4..7da8375 100644 (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()
index c147a66..ff73b3d 100644 (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"; }