From f8f149fd4999b6c77901f2ff8a9cef36ef35148c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 21 May 2017 11:13:02 +0200
Subject: caffe: BLAS fix for Haiku


diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 4a5bac4..81d5e83 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -105,6 +105,7 @@ if(USE_OPENCV)
 endif()
 
 # ---[ BLAS
+if(NOT HAIKU)
 if(NOT APPLE)
   set(BLAS "Atlas" CACHE STRING "Selected BLAS library")
   set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL")
@@ -134,6 +135,11 @@ elseif(APPLE)
     endif()
   endif()
 endif()
+elseif(HAIKU)
+    find_package(OpenBLAS REQUIRED)
+    list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${OpenBLAS_INCLUDE_DIR})
+    list(APPEND Caffe_LINKER_LIBS PUBLIC ${OpenBLAS_LIB})
+endif()
 
 # ---[ Python
 if(BUILD_python)
-- 
2.12.2

