-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
45 lines (37 loc) · 1.8 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
cmake_minimum_required(VERSION 3.5)
project(UAV)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O0")
SET(OpenCV_DIR /usr/local/opencv/3.4.3/share/OpenCV)
set(CMAKE_CXX_STANDARD 11)
set(ONBOARDSDK_SOURCE "${PROJECT_SOURCE_DIR}/osdk-core")
find_package(OpenCV REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/libBase/include)
include_directories(${PROJECT_SOURCE_DIR}/libHardWare/serialPort/include)
include_directories(${PROJECT_SOURCE_DIR}/libHardWare/usbCapture/include)
include_directories(${PROJECT_SOURCE_DIR}/libDetection/include)
include_directories(${PROJECT_SOURCE_DIR}/libPid/include)
include_directories(${ONBOARDSDK_SOURCE}/api/inc)
include_directories(${ONBOARDSDK_SOURCE}/utility/inc)
include_directories(${ONBOARDSDK_SOURCE}/hal/inc)
include_directories(${ONBOARDSDK_SOURCE}/protocol/inc)
include_directories(${ONBOARDSDK_SOURCE}/platform/linux/inc)
include_directories(${PROJECT_SOURCE_DIR}/common)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src DIR_SRCS)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/common COMMON_SRCS)
ADD_LIBRARY (LinuxHelper ${COMMON_SRCS})
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/osdk-core)
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/libBase)
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/libHardWare)
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/libDetection)
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/libPid)
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/unittest)
add_executable(example ${DIR_SRCS})
target_link_libraries(example Base)
target_link_libraries(example SerialPort UsbCapture LinuxHelper)
target_link_libraries(example pthread)
target_link_libraries(example Detection)
target_link_libraries(example Pid)
target_link_libraries(example djiosdk-core)
# find_package(OpenCV REQUIRED)
target_link_libraries(example ${OpenCV_LIBS} librealsense2.so)