summaryrefslogtreecommitdiffstats
path: root/cmake/DetectBSD.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/DetectBSD.cmake')
-rw-r--r--cmake/DetectBSD.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/DetectBSD.cmake b/cmake/DetectBSD.cmake
new file mode 100644
index 0000000..5c5b3b0
--- /dev/null
+++ b/cmake/DetectBSD.cmake
@@ -0,0 +1,18 @@
+# BSD
+if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
+ set(BSD TRUE CACHE INTERNAL "BSD detection")
+ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ set(FREEBSD TRUE CACHE INTERNAL "BSD detection")
+ endif()
+ if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
+ set(KFREEBSD TRUE CACHE INTERNAL "BSD detection")
+ endif()
+ if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+ set(OPENBSD TRUE CACHE INTERNAL "BSD detection")
+ endif()
+endif()
+
+if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+ set(BSD TRUE CACHE INTERNAL "BSD detection")
+ set(FREEBSD TRUE CACHE INTERNAL "BSD detection")
+endif()