-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
54 lines (43 loc) · 1.35 KB
/
CMakeLists.txt
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.5)
project( detector )
set( EXECUTABLE_OUTPUT_PATH /home/min/CatProject/detector )
set( USE_TRACKING ON )
find_package( OpenCV REQUIRED )
find_package( Threads REQUIRED )
find_package( Boost 1.58.0 REQUIRED )
# find_package(OpenMP)
# if (OPENMP_FOUND)
# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# endif()
include_directories( ${OpenCV_INCLUDE_DIRS} )
include_directories( /home/min/CatProject/detector/include )
include_directories( /usr/local/cuda/include )
include_directories( ${Boost_INCLUDE_DIR} )
add_definitions( -DGPU -DCUDNN )
set( SOURCE
src/darknet.cpp
src/detector.cpp
src/main.cpp
src/function.cpp
src/video.cpp src/video.hpp)
add_executable( detector ${SOURCE} )
find_library( DARKNET_LIB
NAMES darknet
PATHS /home/min/CatProject/detector/lib/
NO_DEFAULT_PATH
)
find_library( BOOST_SYSTEM_LIB
NAMES boost_system
PATHS /usr/lib/x86_64-linux-gnu/
NO_DEFAULT_PATH
)
find_library( BOOST_FILESYSTEM_LIB
NAMES boost_filesystem
PATHS /usr/lib/x86_64-linux-gnu/
NO_DEFAULT_PATH
)
target_link_libraries( detector ${OpenCV_LIBS} ${DARKNET_LIB} )
target_link_libraries( detector cuda cudart cublas curand cudnn )
target_link_libraries( detector ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries( detector ${BOOST_SYSTEM_LIB} )
target_link_libraries( detector ${BOOST_FILESYSTEM_LIB} )