-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
executable file
·48 lines (35 loc) · 1.08 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
cmake_minimum_required(VERSION 3.5)
project(dwa_demo)
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
set(CMAKE_CXX_STANDARD 11)
SET(CMAKE_C_COMPILER g++)
add_compile_options(-std=c++11)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/modules")
find_package(OpenCV 3.4.0 REQUIRED)
find_package(CUDA)
set(CUDA_SOURCE_PROPERTY_FORMAT OBJ)
set(CUDA_SEPARABLE_COMPILATION ON)
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
set(CUDA_NVCC_FLAGS -arch=sm_60;-O3;-G;-g;-std=c++11)
include_directories(
${EIGEN3_INCLUDE_DIR}
)
add_executable(dwa_cpp_demo
cpp_sample/dwa_demo.cpp cpp_sample/dwa.cpp cpp_sample/dwa.h cpp_sample/utility.h)
target_link_libraries(dwa_cpp_demo
${OpenCV_LIBS}
)
include_directories(
${CUDA_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
)
CUDA_ADD_EXECUTABLE(dwa_cuda_demo
cuda_sample/dwa_demo.cpp
cuda_sample/dwa.cu)
target_link_libraries(dwa_cuda_demo
${CUDA_LIBRARIES}
${OpenCV_LIBS}
)