forked from stephane/libmodbus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (33 loc) · 777 Bytes
/
CMakeLists.txt
File metadata and controls
41 lines (33 loc) · 777 Bytes
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
cmake_minimum_required(VERSION 2.8.3)
project(libmodbus)
find_package(catkin REQUIRED COMPONENTS
cmake_modules
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES modbus
)
###########
## Build ##
###########
include_directories(src)
add_library(modbus
src/modbus-data.c
src/modbus-rtu.c
src/modbus-tcp.c
src/modbus.c
)
#############
## Install ##
#############
## Mark executables and/or libraries for installation
install(TARGETS modbus
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY src/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)