forked from stephanecharette/DarkHelp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CM_dependencies.cmake
32 lines (25 loc) · 1.06 KB
/
CM_dependencies.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# DarkHelp - C++ helper class for Darknet's C API.
# Copyright 2019-2022 Stephane Charette <[email protected]>
# MIT license applies. See "license.txt" for details.
FIND_PACKAGE ( Threads REQUIRED )
FIND_PACKAGE ( OpenCV CONFIG REQUIRED )
INCLUDE_DIRECTORIES (${OpenCV_INCLUDE_DIRS} )
IF (WIN32)
# Assume that vcpkg was used on Windows
FIND_PACKAGE (Darknet REQUIRED)
INCLUDE_DIRECTORIES (${Darknet_INCLUDE_DIR})
SET (Darknet Darknet::dark)
ELSE ()
FIND_LIBRARY (Darknet darknet)
ENDIF ()
SET (StdCppFS "")
IF (NOT WIN32)
FIND_LIBRARY (Magic magic) # sudo apt-get install libmagic-dev
# On older 18.04, we need to use "experimental/filesystem" instead of "filesystem"
# and we need to pass in the -lstdc++fs flag when linking. This seems to have no
# impact even when using newer versions of g++ which technically doesn't need this
# to link. (Does this need to be fixed in a different manner?)
SET ( StdCppFS stdc++fs )
ENDIF ()
FIND_PATH (TCLAP_INCLUDE_DIRS "tclap/Arg.h") # sudo apt-get install libtclap-dev
INCLUDE_DIRECTORIES (${TCLAP_INCLUDE_DIRS})