forked from gazebosim/gz-cmake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project option: REPLACE_IGNITION_INCLUDE_PATH (gazebosim#190)
* Add REPLACE_IGNITION_INCLUDE_PATH option to IgnConfigureProject. The include paths are now configurable and default to ignition/${IGN_DESIGNATION} to match existing behavior. * Use ign_install_all_headers in example Confirm location of auto-generated headers by including them from AlmostEmpty.cc * Use IGN_INCLUDE_INSTALL_DIR_POSTFIX in templates Signed-off-by: Steve Peters <scpeters@openrobotics.org>
- Loading branch information
1 parent
4e38083
commit e187a09
Showing
13 changed files
with
57 additions
and
29 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) | ||
project(no_ignition_prefix VERSION 0.1.0) | ||
find_package(ignition-cmake2 REQUIRED) | ||
ign_configure_project(NO_IGNITION_PREFIX) | ||
ign_configure_project( | ||
NO_IGNITION_PREFIX | ||
REPLACE_IGNITION_INCLUDE_PATH no_ign) | ||
ign_configure_build(QUIT_IF_BUILD_ERRORS) | ||
ign_create_packages() | ||
ign_create_docs() |
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 |
---|---|---|
@@ -1,18 +1,34 @@ | ||
# no\_ignition\_prefix | ||
# no\_ignition\_prefix example | ||
|
||
This package uses the `NO_IGNITION_PREFIX` option to `ign_configure_project` | ||
## Configuring project name | ||
|
||
This package uses the `NO_IGNITION_PREFIX` option in `ign_configure_project` | ||
to allow a cmake package name without the `ignition-` prefix. | ||
To confirm, build this package and then observe that the tarball, | ||
To confirm, configure this package and | ||
`package_source` and then observe that the tarball, | ||
pkg-config `.pc` file, and cmake config files omit the `ignition-` prefix: | ||
|
||
~~~ | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
make package_source | ||
~~~ | ||
|
||
* `no_ignition_prefix-0.1.0.tar.bz2` | ||
* `cmake/no_ignition_prefix-config.cmake` | ||
* `cmake/pkgconfig/no_ignition_prefix.pc` | ||
|
||
## Configuring include directory names | ||
|
||
This package uses the `REPLACE_IGNITION_INCLUDE_PATH` option in `ign_configure_project` | ||
to allow a custom include path of `no_ign`, which doesn't start with `ignition/`. | ||
To confirm, build the package and observe that `AlmostEmpty.cc` | ||
compiles successfully while including `no_ign/Export.hh`: | ||
|
||
~~~ | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
~~~ |
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 @@ | ||
add_subdirectory(no_ign) |
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 @@ | ||
ign_install_all_headers() |
Empty file.
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