forked from AlessioMorale/ld06_lidar
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
59 lines (46 loc) · 1.42 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
cmake_minimum_required(VERSION 2.8.3)
project(ur12_lidar)
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES ur12_lidar
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
## Get current directory files
aux_source_directory(. file_name)
if(file_name MATCHES "slbf.cpp")
add_definitions(-D"USE_SLBF")
message("-- #define USE_SLBF")
endif()
if(file_name MATCHES "slbi.cpp")
add_definitions(-D"USE_SLBI")
message("-- #define USE_SLBI")
endif()
SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
file(GLOB MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
add_executable(ur12_lidar ${MAIN_SRC})
target_link_libraries(ur12_lidar pthread udev ${catkin_LIBRARIES})
## Mark executables and/or libraries for installation
install(TARGETS ${PROJECT_NAME} ur12_lidar
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark other files for installation (e.g. launch and bag files, etc.)
install(FILES
launch/ur12.launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)