Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport GZ_DESIGNATION tick-tock #284

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api.md.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Ignition @IGN_DESIGNATION_CAP@
## Ignition @GZ_DESIGNATION_CAP@

Ignition @IGN_DESIGNATION_CAP@ is a component in Ignition, a set of libraries
Ignition @GZ_DESIGNATION_CAP@ is a component in Ignition, a set of libraries
designed to rapidly develop robot and simulation applications.

## License
Expand Down
32 changes: 19 additions & 13 deletions cmake/IgnConfigureProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# cmake project name.
# REPLACE_IGNITION_INCLUDE_PATH: Optional. Specify include folder
# names to replace the default value of
# ignition/${IGN_DESIGNATION}
# ignition/${GZ_DESIGNATION}
# VERSION_SUFFIX: Optional. Specify a prerelease version suffix.
#
#===============================================================================
Expand Down Expand Up @@ -55,40 +55,46 @@ macro(ign_configure_project)
#============================================================================
# Extract the designation
#============================================================================
set(IGN_DESIGNATION ${PROJECT_NAME})
set(GZ_DESIGNATION ${PROJECT_NAME})
# Remove the leading "ignition-"
string(REGEX REPLACE "ignition-" "" IGN_DESIGNATION ${IGN_DESIGNATION})
string(REGEX REPLACE "ignition-" "" GZ_DESIGNATION ${GZ_DESIGNATION})
# Remove the trailing version number
string(REGEX REPLACE "[0-9]+" "" IGN_DESIGNATION ${IGN_DESIGNATION})
string(REGEX REPLACE "[0-9]+" "" GZ_DESIGNATION ${GZ_DESIGNATION})

#============================================================================
# Set project variables
#============================================================================

if(ign_configure_project_NO_IGNITION_PREFIX)
set(PROJECT_NAME_NO_VERSION ${IGN_DESIGNATION})
set(PROJECT_NAME_NO_VERSION ${GZ_DESIGNATION})
else()
set(PROJECT_NAME_NO_VERSION "ignition-${IGN_DESIGNATION}")
set(PROJECT_NAME_NO_VERSION "ignition-${GZ_DESIGNATION}")
endif()
string(TOLOWER ${PROJECT_NAME_NO_VERSION} PROJECT_NAME_NO_VERSION_LOWER)
string(TOUPPER ${PROJECT_NAME_NO_VERSION} PROJECT_NAME_NO_VERSION_UPPER)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
string(TOLOWER ${IGN_DESIGNATION} IGN_DESIGNATION_LOWER)
string(TOUPPER ${IGN_DESIGNATION} IGN_DESIGNATION_UPPER)
string(TOLOWER ${GZ_DESIGNATION} GZ_DESIGNATION_LOWER)
string(TOUPPER ${GZ_DESIGNATION} GZ_DESIGNATION_UPPER)

string(SUBSTRING ${IGN_DESIGNATION} 0 1 IGN_DESIGNATION_FIRST_LETTER)
string(TOUPPER ${IGN_DESIGNATION_FIRST_LETTER} IGN_DESIGNATION_FIRST_LETTER)
string(REGEX REPLACE "^.(.*)" "${IGN_DESIGNATION_FIRST_LETTER}\\1"
IGN_DESIGNATION_CAP "${IGN_DESIGNATION}")
string(SUBSTRING ${GZ_DESIGNATION} 0 1 GZ_DESIGNATION_FIRST_LETTER)
string(TOUPPER ${GZ_DESIGNATION_FIRST_LETTER} GZ_DESIGNATION_FIRST_LETTER)
string(REGEX REPLACE "^.(.*)" "${GZ_DESIGNATION_FIRST_LETTER}\\1"
GZ_DESIGNATION_CAP "${GZ_DESIGNATION}")

set(IGN_DESIGNATION ${GZ_DESIGNATION}) # TODO(CH3): Deprecated. Remove on tock.
set(IGN_DESIGNATION_LOWER ${GZ_DESIGNATION_LOWER}) # TODO(CH3): Deprecated. Remove on tock.
set(IGN_DESIGNATION_UPPER ${GZ_DESIGNATION_UPPER}) # TODO(CH3): Deprecated. Remove on tock.
set(IGN_DESIGNATION_FIRST_LETTER ${GZ_DESIGNATION_FIRST_LETTER}) # TODO(CH3): Deprecated. Remove on tock.
set(IGN_DESIGNATION_CAP ${GZ_DESIGNATION_CAP}) # TODO(CH3): Deprecated. Remove on tock.

set(PROJECT_EXPORT_NAME ${PROJECT_NAME_LOWER})
set(PROJECT_LIBRARY_TARGET_NAME ${PROJECT_NAME_LOWER})

if(ign_configure_project_REPLACE_IGNITION_INCLUDE_PATH)
set(PROJECT_INCLUDE_DIR ${ign_configure_project_REPLACE_IGNITION_INCLUDE_PATH})
else()
set(PROJECT_INCLUDE_DIR ignition/${IGN_DESIGNATION})
set(PROJECT_INCLUDE_DIR ignition/${GZ_DESIGNATION})
endif()

# version <major>.<minor>
Expand Down
2 changes: 1 addition & 1 deletion cmake/IgnCreateDocs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function(ign_create_docs)
# generated in a project that has no class hierarchy.
file(READ "${IGNITION_CMAKE_DOXYGEN_DIR}/header.html" doxygen_header)
file(READ "${IGNITION_CMAKE_DOXYGEN_DIR}/footer.html" doxygen_footer)
string(REGEX REPLACE "\\$projectname" "Ignition ${IGN_DESIGNATION_CAP}"
string(REGEX REPLACE "\\$projectname" "Ignition ${GZ_DESIGNATION_CAP}"
doxygen_header ${doxygen_header})
string(REGEX REPLACE "\\$projectnumber" "${PROJECT_VERSION_FULL}"
doxygen_header ${doxygen_header})
Expand Down
2 changes: 1 addition & 1 deletion cmake/IgnPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ macro(ign_setup_packages)
#============================================================================
# Set up installation directories
set(IGN_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
set(IGN_INCLUDE_INSTALL_DIR_POSTFIX "ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(IGN_INCLUDE_INSTALL_DIR_POSTFIX "ignition/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(IGN_INCLUDE_INSTALL_DIR_FULL "${IGN_INCLUDE_INSTALL_DIR}/${IGN_INCLUDE_INSTALL_DIR_POSTFIX}")
set(IGN_DATA_INSTALL_DIR_POSTFIX "ignition/${PROJECT_NAME_LOWER}")
set(IGN_DATA_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/${IGN_DATA_INSTALL_DIR_POSTFIX}")
Expand Down
10 changes: 5 additions & 5 deletions cmake/IgnUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ macro(ign_find_package PACKAGE_NAME)
# ignition-<project>.pc file. This is probably an oversight in our build
# system scripts, so we will emit a warning about this.
message(AUTHOR_WARNING
" -- THIS MESSAGE IS INTENDED FOR IGNITION-${IGN_DESIGNATION_UPPER} AUTHORS --\n"
" -- THIS MESSAGE IS INTENDED FOR IGNITION-${GZ_DESIGNATION_UPPER} AUTHORS --\n"
" (IF YOU SEE THIS, PLEASE REPORT IT)\n"
"Could not find pkg-config information for ${PACKAGE_NAME}. "
"It was not provided by the find-module for the package, nor was it "
Expand Down Expand Up @@ -613,7 +613,7 @@ endfunction()
# additional suffix (like .old or .backup) to prevent a file from being included.
#
# GENERATED_HEADERS should be generated headers which should be included by
# ${IGN_DESIGNATION}.hh. This will only add them to the header, it will not
# ${GZ_DESIGNATION}.hh. This will only add them to the header, it will not
# generate or install them.
#
# This will also run configure_file on ign_auto_headers.hh.in and config.hh.in
Expand Down Expand Up @@ -734,7 +734,7 @@ function(ign_install_all_headers)

# Define the input/output of the configuration for the core "master" header
set(master_header_in ${IGNITION_CMAKE_DIR}/ign_auto_headers.hh.in)
set(master_header_out ${CMAKE_CURRENT_BINARY_DIR}/../${IGN_DESIGNATION}.hh)
set(master_header_out ${CMAKE_CURRENT_BINARY_DIR}/../${GZ_DESIGNATION}.hh)

endif()

Expand Down Expand Up @@ -955,7 +955,7 @@ function(ign_create_core_library)
_ign_add_library_or_component(
LIB_NAME ${PROJECT_LIBRARY_TARGET_NAME}
INCLUDE_DIR "${PROJECT_INCLUDE_DIR}"
EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER}
EXPORT_BASE IGNITION_${GZ_DESIGNATION_UPPER}
SOURCES ${sources}
${interface_option})

Expand Down Expand Up @@ -1139,7 +1139,7 @@ function(ign_add_component component_name)
_ign_add_library_or_component(
LIB_NAME ${component_target_name}
INCLUDE_DIR "${PROJECT_INCLUDE_DIR}/${include_subdir}"
EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER}_${component_name_upper}
EXPORT_BASE IGNITION_${GZ_DESIGNATION_UPPER}_${component_name_upper}
SOURCES ${sources}
${interface_option})

Expand Down
6 changes: 3 additions & 3 deletions cmake/cpack_options.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CPACK_PACKAGE_NAME "@PROJECT_NAME_NO_VERSION@")
set(CPACK_PACKAGE_VENDOR "osrfoundation.org")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"A set of @IGN_DESIGNATION@ classes for robot applications.")
"A set of @GZ_DESIGNATION@ classes for robot applications.")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME_NO_VERSION_LOWER@")
set(CPACK_RESOURCE_FILE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@/LICENSE")
set(CPACK_RESOURCE_FILE_README "@CMAKE_CURRENT_SOURCE_DIR@/README.md")
Expand All @@ -15,12 +15,12 @@ set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION
"A set of @IGN_DESIGNATION@ classes for robot applications.")
"A set of @GZ_DESIGNATION@ classes for robot applications.")

set(CPACK_RPM_PACKAGE_ARCHITECTURE "@DPKG_ARCH@")
set(CPACK_RPM_PACKAGE_REQUIRES "@DEBIAN_PACKAGE_DEPENDS@")
set(CPACK_RPM_PACKAGE_DESCRIPTION
"A set of @IGN_DESIGNATION@ classes for robot applications.")
"A set of @GZ_DESIGNATION@ classes for robot applications.")

set (CPACK_PACKAGE_FILE_NAME
"@PROJECT_NAME_NO_VERSION_LOWER@-@PROJECT_VERSION_FULL@")
Expand Down
2 changes: 1 addition & 1 deletion cmake/ignition-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ endforeach()
set(@PROJECT_NAME_NO_VERSION_UPPER@_DOXYGEN_TAGFILE "${PACKAGE_PREFIX_DIR}/@IGN_DATA_INSTALL_DIR@/@[email protected]")

# Specify the API url. This is where the doxygen tag file will resolve URLS to.
set(@PROJECT_NAME_NO_VERSION_UPPER@_API_URL "https://gazebosim.org/api/@IGN_DESIGNATION@/@PROJECT_VERSION_MAJOR@")
set(@PROJECT_NAME_NO_VERSION_UPPER@_API_URL "https://gazebosim.org/api/@GZ_DESIGNATION@/@PROJECT_VERSION_MAJOR@")
4 changes: 2 additions & 2 deletions cmake/pkgconfig/ignition-component.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ prefix=${pcfiledir}/@PC_CONFIG_RELATIVE_PATH_TO_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@IGN_INCLUDE_INSTALL_DIR_POSTFIX@

Name: Ignition @IGN_DESIGNATION@ @component_name@
Description: A set of @IGN_DESIGNATION@ @component_name@ classes for robot applications
Name: Ignition @GZ_DESIGNATION@ @component_name@
Description: A set of @GZ_DESIGNATION@ @component_name@ classes for robot applications
Version: ignition-cmake@IGNITION_CMAKE_VERSION_MAJOR@ >= 1.1 @PROJECT_VERSION_FULL_NO_SUFFIX@
Requires: @component_pkgconfig_requires@
Requires.private: @component_pkgconfig_requires_private@
Expand Down
4 changes: 2 additions & 2 deletions cmake/pkgconfig/ignition.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ prefix=${pcfiledir}/@PC_CONFIG_RELATIVE_PATH_TO_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@IGN_INCLUDE_INSTALL_DIR_POSTFIX@

Name: Ignition @IGN_DESIGNATION@
Description: A set of @IGN_DESIGNATION@ classes for robot applications
Name: Ignition @GZ_DESIGNATION@
Description: A set of @GZ_DESIGNATION@ classes for robot applications
Version: @PROJECT_VERSION_FULL_NO_SUFFIX@
Requires: ignition-cmake@IGNITION_CMAKE_VERSION_MAJOR@ >= 1.1 @PROJECT_PKGCONFIG_REQUIRES@
Requires.private: @PROJECT_PKGCONFIG_REQUIRES_PRIVATE@
Expand Down
4 changes: 2 additions & 2 deletions cmake/upload_doc.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ ! -f "@CMAKE_BINARY_DIR@/doxygen/html/index.html" ]; then
fi

# Dry run
aws s3 sync --dryrun @CMAKE_BINARY_DIR@/doxygen/html/ s3://gazebosim.org/api/@IGN_DESIGNATION@/@PROJECT_VERSION_MAJOR@/
aws s3 sync --dryrun @CMAKE_BINARY_DIR@/doxygen/html/ s3://gazebosim.org/api/@GZ_DESIGNATION@/@PROJECT_VERSION_MAJOR@/

if [ -z "$1" ]; then
echo -n "Upload (Y/n)? "
Expand All @@ -32,7 +32,7 @@ fi
if [ "$ans" = "n" ] || [ "$ans" = "N" ]; then
exit 1
else
aws s3 sync @CMAKE_BINARY_DIR@/doxygen/html/ s3://gazebosim.org/api/@IGN_DESIGNATION@/@PROJECT_VERSION_MAJOR@/
aws s3 sync @CMAKE_BINARY_DIR@/doxygen/html/ s3://gazebosim.org/api/@GZ_DESIGNATION@/@PROJECT_VERSION_MAJOR@/

echo "WARNING"
echo " A CloudFront invalidation is required. Run the following command with the appropriate \$CLOUDFRONT_DISTRIBUTION_ID:\n"
Expand Down
2 changes: 1 addition & 1 deletion config/ignition-cmake.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=${pcfiledir}/@IGN_PC_CONFIG_RELATIVE_PATH_TO_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@IGN_INCLUDE_INSTALL_DIR_POSTFIX@

Name: Ignition @IGN_DESIGNATION@
Name: Ignition @GZ_DESIGNATION@
Description: Build system package for the ignition libraries
Version: @PROJECT_VERSION_FULL_NO_SUFFIX@
Requires:
Expand Down
6 changes: 3 additions & 3 deletions doc/doxygen/api.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "Gazebo @IGN_DESIGNATION_CAP@"
PROJECT_NAME = "Gazebo @GZ_DESIGNATION_CAP@"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down Expand Up @@ -915,7 +915,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.

FILTER_PATTERNS = *.hh="sed -e 's/inline\snamespace\s.*\s{$\|ignition::@IGN_DESIGNATION@::\|IGN_DEPRECATED([0-9\.]\+)\|IGNITION_@IGN_DESIGNATION_UPPER@_VISIBLE//g'"
FILTER_PATTERNS = *.hh="sed -e 's/inline\snamespace\s.*\s{$\|ignition::@GZ_DESIGNATION@::\|IGN_DEPRECATED([0-9\.]\+)\|IGNITION_@GZ_DESIGNATION_UPPER@_VISIBLE//g'"

# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will also be used to filter the input files that are used for
Expand Down Expand Up @@ -1231,7 +1231,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.

DOCSET_FEEDNAME = "Gazebo @IGN_DESIGNATION_CAP@ API Documentation"
DOCSET_FEEDNAME = "Gazebo @GZ_DESIGNATION_CAP@ API Documentation"

# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
Expand Down
4 changes: 2 additions & 2 deletions tutorials.md.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\page tutorials Tutorials

Welcome to the Ignition @IGN_DESIGNATION_CAP@ tutorials. These tutorials
Welcome to the Ignition @GZ_DESIGNATION_CAP@ tutorials. These tutorials
will guide you through the process of understanding the capabilities of the
Ignition @IGN_DESIGNATION_CAP@ library and how to use the library effectively.
Ignition @GZ_DESIGNATION_CAP@ library and how to use the library effectively.


**The tutorials**
Expand Down