-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists_yolo.txt
56 lines (44 loc) · 1.77 KB
/
CMakeLists_yolo.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
55
56
cmake_minimum_required(VERSION 3.5)
project(supervisory_frame)
set(CMAKE_CXX_STANDARD 11)
add_compile_options(-std=c++11)
ADD_DEFINITIONS(-DGPU)
ADD_DEFINITIONS(-DCUDNN)
ADD_DEFINITIONS(-DDEBUG)
set(CUDA_PATH /usr/local/cuda)
set(DARKNET_PATH /home/dujiajun/darknet)
include_directories(include)
include_directories(${CUDA_PATH}/include)
include_directories(${DARKNET_PATH}/src)
link_directories(/usr/local/lib)
link_directories(${CUDA_PATH}/lib)
link_directories(${CUDA_PATH}/lib64)
link_directories(${DARKNET_PATH})
aux_source_directory(src/opencv2 OPENCV_TRACKING_SOURCE_FILES)
set(SOURCE_FILES
test/test_yolo_detector.cpp
src/real_time_monitor.cpp
src/displayer.cpp
src/fusion/detector_only_fusion.cpp
src/detector/yolo_detector.cpp
src/target.cpp
src/utils/opencv_util.cpp)
add_executable(test_yolo_detector ${SOURCE_FILES})
# attention:
# OpenCV_DIR should be set by yourself,
# remember that directory like {opencv-3.2.0/build} is created by you for installing OpenCV
set(OpenCV_DIR /home/dujiajun/opencv-3.2.0/build)
FIND_PACKAGE(OpenCV REQUIRED)
TARGET_LINK_LIBRARIES(test_yolo_detector ${OpenCV_LIBS})
find_package(Threads REQUIRED)
if(THREADS_HAVE_PTHREAD_ARG)
set_property(TARGET test_yolo_detector PROPERTY COMPILE_OPTIONS -pthread)
set_property(TARGET test_yolo_detector PROPERTY INTERFACE_COMPILE_OPTIONS -pthread)
endif()
if(CMAKE_THREAD_LIBS_INIT)
target_link_libraries(test_yolo_detector ${CMAKE_THREAD_LIBS_INIT})
endif()
target_link_libraries(test_yolo_detector -ldarknet)
target_link_libraries(test_yolo_detector -lopencv_core -lopencv_highgui -lopencv_imgproc)
target_link_libraries(test_yolo_detector -lboost_system -lboost_thread -lstdc++)
target_link_libraries(test_yolo_detector -lcudart -lcublas -lcurand)