forked from zlg9folira/cptl_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (37 loc) · 1.28 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
#set (CMAKE_CXX_STANDARD 11)
cmake_minimum_required(VERSION 2.8.3)
project(cptl_ros)
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs cavas_msgs)
catkin_package()
catkin_package(
CATKIN_DEPENDS
roscpp cavas_msgs
INCLUDE_DIRS
)
include_directories(include ${catkin_INCLUDE_DIRS} ${cavas_msgs_INCLUDE_DIRS})
###########
## Build ##
###########
#add_definitions(-std=c++0x -L/usr/lib/libwiringPi.so -lwiringPi -lpthread)
## Declare a cpp library
add_library(cptl_ros_driver src/cptl_ros_driver.cpp)
target_link_libraries(cptl_ros_driver ${catkin_LIBRARIES} -lbcm2835)
## Declare a cpp executable
add_executable(cptl_ros src/cptl_ros.cpp)
target_link_libraries(cptl_ros cptl_ros_driver ${catkin_LIBRARIES} -lbcm2835)
## Mark executables and/or libraries for installation
install(TARGETS cptl_ros cptl_ros_driver
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)