-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (22 loc) · 911 Bytes
/
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
# cmake needs this line
cmake_minimum_required(VERSION 3.1)
# Define project name
project(my_yolo)
# Find OpenCV, you may need to set OpenCV_DIR variable
# to the absolute path to the directory containing OpenCVConfig.cmake file
# via the command line or GUI
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
# Enable C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
# 设置构建类型为调试
set(CMAKE_BUILD_TYPE Debug)
# 添加编译选项以包含调试信息
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
# Declare the executable target built from your sources
# add_executable(my_yolo main.cpp)
add_executable(my_yolo main.cpp dataloder/dataloder.cpp model/yolo.cpp AM/AM.cpp)
# add_executable(my_yolo main.cpp dataloder/dataloder.cpp)
# Link your application with OpenCV libraries
target_link_libraries(my_yolo PRIVATE ${OpenCV_LIBS})