-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dfea6f
commit 30fa39c
Showing
12 changed files
with
1,475 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(cpp_pid) | ||
|
||
# Compile options | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic -std=c++17) | ||
endif() | ||
|
||
# Find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(std_msgs REQUIRED) | ||
find_package(vectornav_msgs REQUIRED) | ||
find_package(dbw_msgs REQUIRED) | ||
|
||
## System dependencies are found with CMake's conventions | ||
find_package(Boost REQUIRED COMPONENTS system) | ||
|
||
# Include directories | ||
include_directories(include) | ||
|
||
# Create executable | ||
add_executable(${PROJECT_NAME}_main src/main.cpp src/server.cpp src/environment.cpp src/controller.cpp) | ||
|
||
# Set dependencies for the target | ||
ament_target_dependencies(${PROJECT_NAME}_main rclcpp std_msgs vectornav_msgs dbw_msgs) | ||
|
||
# Install targets | ||
install(TARGETS | ||
${PROJECT_NAME}_main | ||
DESTINATION lib/${PROJECT_NAME} | ||
) | ||
|
||
# Install launch | ||
install(DIRECTORY launch/ | ||
DESTINATION share/${PROJECT_NAME}/launch | ||
) | ||
|
||
# Testing and linting | ||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
set(ament_cmake_copyright_FOUND TRUE) | ||
set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.