Skip to content

Commit 68fcb05

Browse files
1 parent 507d039 commit 68fcb05

File tree

8 files changed

+1344
-0
lines changed

8 files changed

+1344
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# cmake/hunter
35+
_*/
36+
37+
# osx
38+
.DS_Store
39+
40+
# emacs
41+
*~

CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
3+
option(HUNTER_KEEP_PACKAGE_SOURCES "Keep" ON)
4+
5+
include("cmake/HunterGate.cmake")
6+
7+
HunterGate(
8+
URL "https://github.com/ruslo/hunter/archive/v0.22.16.tar.gz"
9+
SHA1 "84153076a3cebf4869c904fa5c93ea309386b583"
10+
LOCAL # cmake/Hunter/config.cmake
11+
)
12+
13+
project(dlib_dnn_mmod_detect VERSION 0.0.1)
14+
15+
hunter_add_package(dlib)
16+
find_package(dlib CONFIG REQUIRED)
17+
18+
set(app_list dnn_mmod_find_thing_ex dnn_mmod_train_find_thing_ex)
19+
20+
foreach(name ${app_list})
21+
add_executable(${name} ${name}.cpp dnn_mmod_sample_detector.h)
22+
target_link_libraries(${name} PUBLIC dlib::dlib)
23+
install(TARGETS ${name} DESTINATION bin)
24+
endforeach()

cmake/Hunter/config.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
set(dlib_cmake_args
2+
DLIB_HEADER_ONLY=OFF #all previous builds were header on, so that is the default
3+
DLIB_ENABLE_ASSERTS=OFF #must be set on/off or debug/release build will differ and config will not match one
4+
DLIB_NO_GUI_SUPPORT=ON
5+
DLIB_ISO_CPP_ONLY=OFF # needed for directory navigation code (loading training data)
6+
DLIB_JPEG_SUPPORT=OFF # https://github.com/hunter-packages/dlib/blob/eb79843227d0be45e1efa68ef9cc6cc187338c8e/dlib/CMakeLists.txt#L422-L432
7+
DLIB_LINK_WITH_SQLITE3=OFF
8+
DLIB_USE_BLAS=OFF
9+
DLIB_USE_LAPACK=OFF
10+
DLIB_USE_CUDA=ON
11+
DLIB_PNG_SUPPORT=ON
12+
DLIB_JPEG_SUPPORT=ON
13+
DLIB_GIF_SUPPORT=OFF
14+
DLIB_USE_MKL_FFT=OFF
15+
HUNTER_INSTALL_LICENSE_FILES=dlib/LICENSE.txt
16+
)
17+
18+
hunter_config(dlib VERSION ${HUNTER_dlib_VERSION} CMAKE_ARGS ${dlib_cmake_args} DUMMY_SOURCES=2)

0 commit comments

Comments
 (0)