-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
71 lines (55 loc) · 1.59 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
cmake_minimum_required(VERSION 3.5)
project(tiscamera_ros)
# enable C++17 standard (current directory scope)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# configure build types and build c-flags
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
set(WITH_TONEMAPPING_FLAG OFF)
if(WITH_TONEMAPPING_FLAG)
message(WARNING "Build with Tonemapping")
add_definitions( -DTONEMAPPING)
set(WITH_TONEMAPPING cvl)
else()
message(WARNING "Build WITHOUT Tonemapping")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 ")
add_subdirectory(tiscamera_interface)
add_subdirectory(tests)
find_package(Threads REQUIRED)
find_package(OpenCV 4 REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp
image_transport
cv_bridge
mavros
)
# running dependency
catkin_package(
# INCLUDE_DIRS
# LIBRARIES
# CATKIN_DEPENDS imu_vn_100
# DEPENDS
)
# message ("catkin_INCLUDE_DIRS = ${catkin_INCLUDE_DIRS}")
# message ("catkin_LIBRARIES = ${catkin_LIBRARIES}")
add_executable(tiscamera_ros main.cpp ros_publisher.cpp utils.cpp)
target_include_directories(tiscamera_ros
PRIVATE
include
${catkin_INCLUDE_DIRS}
)
target_link_libraries(tiscamera_ros
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
tiscamera_interface::tiscamera_interface
Threads::Threads
${WITH_TONEMAPPING}
)