-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
31 lines (21 loc) · 974 Bytes
/
CMakeLists.txt
File metadata and controls
31 lines (21 loc) · 974 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
# Declare the version of the CMake API for forward-compatibility
cmake_minimum_required(VERSION 2.8)
# Declare the name of the CMake Project
project(ros_interface)
# Find and get all the information about the roscpp package
find_package(roscpp REQUIRED)
# Find Catkin
find_package(catkin REQUIRED)
# Declare this project as a catkin package
catkin_package()
# Add the headers
include_directories(${roscpp_INCLUDE_DIRS}, ${PROJECT_SOURCE_DIR}/include)
# Define a library target called
add_library(ros_interface src/ros_interface.cpp src/node.cpp)
# Define output directory
set_target_properties(ros_interface PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
#set_target_properties(ros_interface PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib)
# Define compile flags
set_target_properties(ros_interface PROPERTIES COMPILE_FLAGS "-Wall -Wextra -std=c++11 -g")
# Libraries to link
target_link_libraries(ros_interface ${roscpp_LIBRARIES})