diff --git a/.travis.yml b/.travis.yml index e7e83c54..5ac426df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 77fcc6fb..b22d6032 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/cmake/modules/FindOpenBLAS.cmake b/cmake/modules/FindOpenBLAS.cmake index a8d58d66..f95c507d 100644 --- a/cmake/modules/FindOpenBLAS.cmake +++ b/cmake/modules/FindOpenBLAS.cmake @@ -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) diff --git a/lib/local/FaceAnalyser/CMakeLists.txt b/lib/local/FaceAnalyser/CMakeLists.txt index 1a983f9c..ef2b7d57 100644 --- a/lib/local/FaceAnalyser/CMakeLists.txt +++ b/lib/local/FaceAnalyser/CMakeLists.txt @@ -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}) diff --git a/lib/local/GazeAnalyser/CMakeLists.txt b/lib/local/GazeAnalyser/CMakeLists.txt index 6f78eee1..d98974a2 100644 --- a/lib/local/GazeAnalyser/CMakeLists.txt +++ b/lib/local/GazeAnalyser/CMakeLists.txt @@ -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}) diff --git a/lib/local/LandmarkDetector/CMakeLists.txt b/lib/local/LandmarkDetector/CMakeLists.txt index be75d9c3..21d900c9 100644 --- a/lib/local/LandmarkDetector/CMakeLists.txt +++ b/lib/local/LandmarkDetector/CMakeLists.txt @@ -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}) diff --git a/lib/local/Utilities/CMakeLists.txt b/lib/local/Utilities/CMakeLists.txt index 6d6e04c2..a53cb2e2 100644 --- a/lib/local/Utilities/CMakeLists.txt +++ b/lib/local/Utilities/CMakeLists.txt @@ -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) \ No newline at end of file