-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (45 loc) · 1.85 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
cmake_minimum_required(VERSION 3.1.0)
option(test "Build tests." OFF)
add_compile_options(-std=c++17)
project(ylm_ros)
find_package(catkin QUIET COMPONENTS roscpp sensor_msgs std_msgs roslib)
if (catkin_FOUND)
find_package(Boost REQUIRED)
###################################
## catkin specific configuration ##
###################################
set(YLM_INCLUDE_DIRS
"include;")
catkin_package(
INCLUDE_DIRS ${YLM_INCLUDE_DIRS}
LIBRARIES ylm_ros
CATKIN_DEPENDS roscpp sensor_msgs std_msgs roslib
DEPENDS message_runtime
)
include_directories(${YLM_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
if (test)
message(STATUS "Tests of library enabled")
add_definitions(-D_UNIT_TESTS_)
endif (test)
add_library(ylm_client STATIC src/lumotive_client_interface.cpp src/ylm_client.cpp)
target_link_libraries(ylm_client ${Boost_LIBRARIES})
add_executable(lumotive_driver src/lumotive_driver.cpp src/network_handler.cpp src/lumotive_cloud_creation.cpp)
target_link_libraries(lumotive_driver ylm_client ${catkin_LIBRARIES})
add_dependencies(lumotive_driver ylm_client)
# catkin_install_python(PROGRAMS scripts/multi_m20_files_generator.py
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
## Mark executables and/or libraries for installation
install(TARGETS lumotive_driver
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
if (test)
find_package(roslaunch REQUIRED)
find_package(rostest REQUIRED)
find_package(catkin REQUIRED rosbag)
add_rostest_gtest(lumotive_ros_tests tests/lumotive_ros_tests.test tests/lumotive_ros_tests.cpp)
target_link_libraries(lumotive_ros_tests ${catkin_LIBRARIES})
endif (test)
endif (catkin_FOUND)
unset(test CACHE) # avoid variable being cached