forked from balanceTWK/ydlidar_ros
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (40 loc) · 1.1 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
cmake_minimum_required(VERSION 2.8.3)
project(ydlidar_ros)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#add_definitions(-std=c++11) # Use C++11
find_package(catkin REQUIRED COMPONENTS
rosconsole
roscpp
sensor_msgs
)
#add_subdirectory(sdk)
set(SDK_PATH "./sdk/")
FILE(GLOB SDK_SRC
"${SDK_PATH}/src/impl/unix/*.cpp"
"${SDK_PATH}/src/*.cpp"
"${SDK_PATH}/src/*.c"
)
catkin_package()
include_directories(
${catkin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/sdk/include
${PROJECT_SOURCE_DIR}/sdk/src
)
add_executable(ydlidar_node src/ydlidar_node.cpp ${SDK_SRC})
add_executable(ydlidar_client src/ydlidar_client.cpp)
target_link_libraries(ydlidar_node
${catkin_LIBRARIES}
)
target_link_libraries(ydlidar_client
${catkin_LIBRARIES}
)
install(TARGETS ydlidar_node ydlidar_client
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch startup sdk
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)