Skip to content

Commit 6c2ffe5

Browse files
committed
Rename INCLUDE_DIR : REPLACE_IGNITION_INCLUDE_PATH
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
1 parent 5b0dc63 commit 6c2ffe5

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

cmake/IgnConfigureProject.cmake

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
#
77
# Sets up an ignition library project.
88
#
9-
# INCLUDE_DIR: Optional. Specify include folder names. Defaults to
10-
# ignition/${IGN_DESIGNATION}
119
# NO_IGNITION_PREFIX: Optional. Don't use ignition as prefix in
1210
# cmake project name.
11+
# REPLACE_IGNITION_INCLUDE_PATH: Optional. Specify include folder
12+
# names to replace the default value of
13+
# ignition/${IGN_DESIGNATION}
1314
# VERSION_SUFFIX: Optional. Specify a prerelease version suffix.
1415
#
1516
#===============================================================================
@@ -34,7 +35,7 @@ macro(ign_configure_project)
3435
#------------------------------------
3536
# Define the expected arguments
3637
set(options NO_IGNITION_PREFIX)
37-
set(oneValueArgs INCLUDE_DIR VERSION_SUFFIX)
38+
set(oneValueArgs REPLACE_IGNITION_INCLUDE_PATH VERSION_SUFFIX)
3839
set(multiValueArgs) # We are not using multiValueArgs yet
3940

4041
#------------------------------------
@@ -84,8 +85,8 @@ macro(ign_configure_project)
8485
set(PROJECT_EXPORT_NAME ${PROJECT_NAME_LOWER})
8586
set(PROJECT_LIBRARY_TARGET_NAME ${PROJECT_NAME_LOWER})
8687

87-
if(ign_configure_project_INCLUDE_DIR)
88-
set(PROJECT_INCLUDE_DIR ${ign_configure_project_INCLUDE_DIR})
88+
if(ign_configure_project_REPLACE_IGNITION_INCLUDE_PATH)
89+
set(PROJECT_INCLUDE_DIR ${ign_configure_project_REPLACE_IGNITION_INCLUDE_PATH})
8990
else()
9091
set(PROJECT_INCLUDE_DIR ignition/${IGN_DESIGNATION})
9192
endif()

examples/no_ignition_prefix/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
22
project(no_ignition_prefix VERSION 0.1.0)
33
find_package(ignition-cmake2 REQUIRED)
44
ign_configure_project(
5-
INCLUDE_DIR no_ign
6-
NO_IGNITION_PREFIX)
5+
NO_IGNITION_PREFIX
6+
REPLACE_IGNITION_INCLUDE_PATH no_ign)
77
ign_configure_build(QUIT_IF_BUILD_ERRORS)
88
ign_create_packages()
99
ign_create_docs()

examples/no_ignition_prefix/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ make package_source
2121

2222
## Configuring include directory names
2323

24-
This package uses the `INCLUDE_DIR` option in `ign_configure_project`
24+
This package uses the `REPLACE_IGNITION_INCLUDE_PATH` option in `ign_configure_project`
2525
to allow a custom include path of `no_ign`, which doesn't start with `ignition/`.
2626
To confirm, build the package and observe that `AlmostEmpty.cc`
2727
compiles successfully while including `no_ign/Export.hh`:

0 commit comments

Comments
 (0)