Skip to content

Commit

Permalink
fix links to ament docs, update defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson authored May 9, 2024
1 parent 6341022 commit 7f59b70
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pages/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ which explains the basics of CMake.
## Ament

Ament is a set of CMake modules specifically designed for ROS 2 with the intent
of making CMake easier to use. See also the
[Ament CMake](https://index.ros.org/doc/ros2/Tutorials/Ament-CMake-Documentation/)
of making CMake easier to use. See the
[Ament CMake](https://docs.ros.org/en/rolling/How-To-Guides/Ament-CMake-Documentation.html)
documentation.

The basic structure of an ament package:

```cmake
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.8)
project(my_package_name)
# Default to C++14
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Expand Down Expand Up @@ -54,7 +54,8 @@ install(
)
# Install our node and library
install(TARGETS my_node my_library
install(
TARGETS my_node my_library
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PACKAGE_NAME}
Expand Down

0 comments on commit 7f59b70

Please sign in to comment.