Commit 2e95a3e9 authored by Guillaume Pasero's avatar Guillaume Pasero

COMP: try to detect cblas when needed by shark

parent 0cb12e2c
......@@ -118,12 +118,22 @@ else()
set(SHARK_USE_DYNLIB 0)
endif()
if(SHARK_USE_CBLAS AND SHARK_USE_DYNLIB)
set(REQUIRED_CBLAS_LIB CBLAS_LIBRARY)
find_library(CBLAS_LIBRARY NAMES cblas)
else()
set(REQUIRED_CBLAS_LIB)
endif()
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR ${REQUIRED_CBLAS_LIB}
VERSION_VAR SHARK_VERSION_STRING)
if(SHARK_FOUND)
set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
set(SHARK_LIBRARIES ${SHARK_LIBRARY} ${Boost_LIBRARIES} )
if(REQUIRED_CBLAS_LIB)
set(SHARK_LIBRARIES ${SHARK_LIBRARIES} ${CBLAS_LIBRARY})
endif()
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment