Maintainer: grey AT openrobotics.org
Build | Status |
---|---|
Ubuntu Focal | |
Homebrew | |
Windows |
gz-cmake provides a set of cmake modules that are used by the C++-based Gazebo projects. These modules help to control the quality and consistency of the Gazebo projects' build systems.
These modules are tailored to the Gazebo projects, so their use for non-Gazebo projects might be limited, but they may serve as a useful reference for setting up a modern cmake build system using good practices.
We recommend following the Binary Install instructions to get up and running as quickly and painlessly as possible.
The Source Install instructions should be used if you need the very latest software improvements, you need to modify the code, or you plan to make a contribution.
On Ubuntu systems, apt-get
can be used to install gz-cmake
:
$ sudo apt install libgz-cmake<#>-dev
Be sure to replace <#>
with a number value, such as 1
or 2
, depending on which version you need.
The only prerequisite of gz-cmake
is cmake
. Ubuntu users can install cmake with the package manager:
$ sudo apt install cmake
To build and install from source, you can clone the repo and use cmake to install the modules as though this is a regular cmake project:
$ git clone https://github.com/gazebosim/gz-cmake
$ cd gz-cmake
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir
$ make -j8
$ make install
Replace /path/to/install/dir
to whatever directory you want to install this package to.
Documentation can be accessed at https://gazebosim.org/libs/cmake Examples are available in this repository. Tutorials are also available in this repository.
Documentation for gz-cmake
can be found within the source code, and also in the MIGRATION.md guide.
A fuller suite of tests in the examples
directory can be enabled by building with BUILDSYSTEM_TESTING
enabled.
Tests can be run by building the test
target. From your build directory you can run:
$ cmake .. -DBUILDSYSTEM_TESTING=1
$ make test
cmake
: cmake modules that get installed by this packagecodecheck
: code linting and static analyzing utilities that get installed by this packageconfig
: template files for producing the config-files ofgz-cmake
; these are only used internallydoc
: template files to help Gazebo projects generate their own documentationexamples
: fake projects that are used to testgz-cmake
include
: C++ utility header files that get installed withgz-cmake
test
: a directory of tests for the C++ utility component ofgz-cmake
tools
: scripts for continuous integration testing
Please see CONTRIBUTING.md.
Please see CODE_OF_CONDUCT.md.
This library uses Semantic Versioning. Additionally, this library is part of the Gazebo project which periodically releases a versioned set of compatible and complementary libraries. See the Gazebo website for version and release information.
This library is licensed under Apache 2.0. See also the LICENSE file.