Trying to fix issues with OpenBLAS include

This commit is contained in:
Tadas Baltrusaitis
2018-06-22 19:23:54 +01:00
parent a005e5b6ae
commit 079c282074
7 changed files with 16 additions and 12 deletions

View File

@@ -74,6 +74,8 @@ before_install:
fi
script:
- ls /usr/include
- ls /usr/include/openblas
- $CXX --version
- cd lib/local/LandmarkDetector/model/patch_experts
- wget https://www.dropbox.com/s/7na5qsjzz8yfoer/cen_patches_0.25_of.dat?dl=1

View File

@@ -146,7 +146,7 @@ else ()
endif ()
# dlib
find_package(dlib 19.13 QUIET)
find_package(dlib 19.13)
if(${dlib_FOUND})
message("dlib information:")
message(" dlib version: ${dlib_VERSION}")
@@ -155,14 +155,8 @@ if(${dlib_FOUND})
if (NOT TARGET dlib)
add_library(dlib INTERFACE IMPORTED GLOBAL)
endif()
set_target_properties(dlib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${dlib_INCLUDE_DIRS}")
set_target_properties(dlib PROPERTIES INTERFACE_LINK_LIBRARIES "${dlib_LIBRARIES}")
else()
message(WARNING "dlib not found in the system. Using the one vended with OpenFace.")
# dlib library
add_subdirectory(lib/3rdParty/dlib)
target_include_directories(dlib INTERFACE lib/3rdParty/dlib/include)
message(FATAL_ERROR "dlib not found in the system, please install dlib")
endif()
# suppress auto_ptr deprecation warnings

View File

@@ -76,6 +76,7 @@ SET(Open_BLAS_LIB_SEARCH_PATHS
)
FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
FIND_PATH(OpenBLAS_INCLUDE_DIR_F NAMES f77blas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS} NO_DEFAULT_PATH)
SET(OpenBLAS_FOUND ON)
@@ -86,6 +87,13 @@ IF(NOT OpenBLAS_INCLUDE_DIR)
MESSAGE(STATUS "Could not find OpenBLAS include. Turning OpenBLAS_FOUND off")
ENDIF()
# Check include files
IF(NOT OpenBLAS_INCLUDE_DIR_F)
MESSAGE(STATUS "Could not find f77blas include.")
ELSE(NOT OpenBLAS_INCLUDE_DIR_F)
MESSAGE(STATUS "Found f77blas include: ${OpenBLAS_INCLUDE_DIR_F}")
ENDIF()
# Check libraries
IF(NOT OpenBLAS_LIB)
SET(OpenBLAS_FOUND OFF)

View File

@@ -39,7 +39,7 @@ target_include_directories(FaceAnalyser PUBLIC ${Boost_INCLUDE_DIRS}/boost)
target_include_directories(FaceAnalyser PUBLIC ${OpenCV_INCLUDE_DIRS})
target_link_libraries(FaceAnalyser PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${OpenBLAS_LIB})
target_link_libraries(FaceAnalyser PUBLIC dlib)
target_link_libraries(FaceAnalyser PUBLIC dlib::dlib)
target_include_directories(FaceAnalyser PRIVATE ${OpenBLAS_INCLUDE_DIR})

View File

@@ -26,7 +26,7 @@ target_include_directories(GazeAnalyser PUBLIC ${Boost_INCLUDE_DIRS}/boost)
target_include_directories(GazeAnalyser PUBLIC ${OpenCV_INCLUDE_DIRS})
target_link_libraries(GazeAnalyser PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${OpenBLAS_LIB})
target_link_libraries(GazeAnalyser PUBLIC dlib)
target_link_libraries(GazeAnalyser PUBLIC dlib::dlib)
target_include_directories(GazeAnalyser PRIVATE ${OpenBLAS_INCLUDE_DIR})

View File

@@ -51,7 +51,7 @@ target_include_directories(LandmarkDetector PUBLIC ${Boost_INCLUDE_DIRS}/boost)
target_include_directories(LandmarkDetector PUBLIC ${OpenCV_INCLUDE_DIRS})
target_link_libraries(LandmarkDetector PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${OpenBLAS_LIB})
target_link_libraries(LandmarkDetector PUBLIC dlib)
target_link_libraries(LandmarkDetector PUBLIC dlib::dlib)
target_include_directories(LandmarkDetector PRIVATE ${OpenBLAS_INCLUDE_DIR})

View File

@@ -34,7 +34,7 @@ target_include_directories(Utilities PUBLIC ${Boost_INCLUDE_DIRS}/boost)
target_include_directories(Utilities PUBLIC ${OpenCV_INCLUDE_DIRS})
target_link_libraries(Utilities PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES})
target_link_libraries(Utilities PUBLIC dlib)
target_link_libraries(Utilities PUBLIC dlib::dlib)
install (TARGETS Utilities EXPORT OpenFaceTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install (FILES ${HEADERS} DESTINATION include/OpenFace)