diff --git a/.gitignore b/.gitignore index 9e73f7a..f84320c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ 3rdparty/LatentSDK* 3rdparty/pittpatt* 3rdparty/cvmatio +3rdparty/dlib* data/*/img data/*/vid data/PCSO/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a67260..670834a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,8 @@ else() set(BITNESS 32) endif() +include(ExternalProject) + # Define resources if(WIN32) set(CPACK_PACKAGE_ICON "${BR_SHARE_DIR}\\\\openbr_small.png") diff --git a/openbr/plugins/classification/dlib.cpp b/openbr/plugins/classification/dlib.cpp index eb4ac82..6326fdd 100644 --- a/openbr/plugins/classification/dlib.cpp +++ b/openbr/plugins/classification/dlib.cpp @@ -2,11 +2,13 @@ #include "openbr/core/qtutils.h" #include "openbr/core/eigenutils.h" +#define DLIB_NO_GUI_SUPPORT #include #include #include #include #include +#include #include diff --git a/openbr/plugins/cmake/dlib.cmake b/openbr/plugins/cmake/dlib.cmake index 135053e..eb98cb5 100644 --- a/openbr/plugins/cmake/dlib.cmake +++ b/openbr/plugins/cmake/dlib.cmake @@ -1,10 +1,14 @@ -set(BR_WITH_DLIB OFF CACHE BOOL "Build with DLib") +set(BR_WITH_DLIB ON CACHE BOOL "Build with DLib") if(${BR_WITH_DLIB}) - find_package(DLib REQUIRED) - add_definitions(-DDLIB_NO_GUI_SUPPORT) - set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${DLib_DIR}/dlib/all/source.cpp) - install(DIRECTORY ${DLib_DIR}/models/ DESTINATION share/openbr/models/dlib) + ExternalProject_Add(dlib + URL http://downloads.sourceforge.net/project/dclib/dlib/v18.16/dlib-18.16.tar.bz2 + URL_MD5 e9e5449bc25370afce2d254327afac99 + SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdparty/dlib-18.16" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "") + include_directories("${CMAKE_SOURCE_DIR}/3rdparty/dlib-18.16") else() set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/classification/dlib.cpp) endif() diff --git a/share/openbr/models b/share/openbr/models index 85842e6..e0fa431 160000 --- a/share/openbr/models +++ b/share/openbr/models @@ -1 +1 @@ -Subproject commit 85842e6da7738e317b9d40d5a395b92cd7b996e1 +Subproject commit e0fa4314abdda0dea598f24609601e2323670969