-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (34 loc) · 1.15 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
cmake_minimum_required(VERSION 2.8.3)
project(slamkit_ros)
set(SLAMKITSDK_PATH "./sdk/slamkit/")
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
FILE(GLOB SLAMKITSDK_SRC
"${SLAMKITSDK_PATH}/src/arch/linux/*.cpp"
"${SLAMKITSDK_PATH}/src/hal/*.cpp"
"${SLAMKITSDK_PATH}/src/*.cpp"
)
find_package(catkin REQUIRED COMPONENTS
roscpp
rosconsole
sensor_msgs
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
include_directories(${LIBUSB_INCLUDE_DIRS})
link_directories(${LIBUSB_LIBRARY_DIRS})
include_directories(
${SLAMKITSDK_PATH}/include
${SLAMKITSDK_PATH}/src
${catkin_INCLUDE_DIRS}
)
catkin_package()
add_executable(slamkitNode src/node.cpp ${SLAMKITSDK_SRC})
target_link_libraries(slamkitNode ${catkin_LIBRARIES} ${LIBUSB_LIBRARIES})
add_executable(slamkitNodeClient src/client.cpp)
target_link_libraries(slamkitNodeClient ${catkin_LIBRARIES} ${LIBUSB_LIBRARIES})
install(TARGETS slamkitNode slamkitNodeClient
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)