-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
60 lines (46 loc) · 1.09 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
if($ENV{ROS_VERSION} EQUAL 1)
cmake_minimum_required(VERSION 3.5)
project(socket_can)
find_package(catkin REQUIRED)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
socket_can
)
include_directories(
include
)
add_library(
socket_can
src/socket_can.cpp
)
install(
TARGETS socket_can
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
else()
cmake_minimum_required(VERSION 3.5)
project(socket_can)
add_compile_options(-std=c++14)
find_package(ament_cmake REQUIRED)
include_directories(include)
add_library(${PROJECT_NAME} STATIC
src/${PROJECT_NAME}.cpp
)
install(
DIRECTORY include/
DESTINATION include
)
install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_package()
endif()