-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (29 loc) · 858 Bytes
/
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
cmake_minimum_required(VERSION 2.8.3)
project(dm245m_driver)
find_path(LIBMODBUS_INCLUDE_DIRS
NAMES modbus.h
HINTS /usr/include/modbus /usr/local/include/modbus)
find_library(LIBMODBUS_LIBRARIES
NAMES libmodbus.so)
if (LIBMODBUS_LIBRARIES)
message( STATUS "Libmodbus found")
else()
message( FATAL_ERROR "Libmodbus Not found")
endif()
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS geometry_msgs roscpp
)
include_directories(
INCLUDE_DIRS include src
${BOOST_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${LIBMODBUS_INCLUDE_DIRS}
)
add_definitions(-std=c++11)
add_executable(dm245m_demo_node src/dm245m_demo_node.cpp src/DM245M.cpp src/DM245MDemo.cpp)
target_link_libraries(dm245m_demo_node ${catkin_LIBRARIES} ${LIBMODBUS_LIBRARIES})