Skip to content

Commit

Permalink
Partial source and CMake migration (#272)
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jul 13, 2022
1 parent 150080f commit d0efe10
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/ci/after_make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -x
make install

# So gz-tools finds fuel-tools
export GZ_CONFIG_PATH=/usr/local/share/ignition
export GZ_CONFIG_PATH=/usr/local/share/gz
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH

# Compile example
Expand Down
12 changes: 6 additions & 6 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
curl
libcurl4-openssl-dev
libgflags-dev
libignition-cmake3-dev
libignition-common5-dev
libignition-math7-dev
libignition-msgs9-dev
libignition-tools2-dev
libignition-utils2-dev
libgz-cmake3-dev
libgz-common5-dev
libgz-math7-dev
libgz-msgs9-dev
libgz-tools2-dev
libgz-utils2-dev
libjsoncpp-dev
libtinyxml2-dev
libyaml-dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@focal
uses: gazebo-tooling/action-gz-ci@focal
with:
codecov-enabled: true
cppcheck-enabled: true
Expand All @@ -24,4 +24,4 @@ jobs:
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@jammy
uses: gazebo-tooling/action-gz-ci@jammy
2 changes: 1 addition & 1 deletion .github/workflows/pr-collection-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- name: Add collection labels
if: github.event.action == 'opened'
uses: ignition-tooling/pr-collection-labeler@v1
uses: gazebo-tooling/pr-collection-labeler@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
#============================================================================
# Configure the project
#============================================================================
gz_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/fuel_tools
VERSION_SUFFIX pre1)
gz_configure_project(VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
Expand All @@ -35,7 +33,7 @@ gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)

#--------------------------------------
# Find libcurl
gz_find_package(IgnCURL REQUIRED PRIVATE PRETTY curl)
gz_find_package(GzCURL REQUIRED PRIVATE PRETTY curl)

#--------------------------------------
# Find jsoncpp
Expand Down
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
1. Use semantic version and prevent crash if version is missing
* [Pull request #151](https://github.com/gazebosim/gz-fuel-tools/pull/151)

1. Document `IGN_FUEL_CACHE_PATH` on command line
1. Document `GZ_FUEL_CACHE_PATH` on command line
* [Pull request #149](https://github.com/gazebosim/gz-fuel-tools/pull/149)

1. Infrastructure
Expand Down Expand Up @@ -183,7 +183,7 @@
1. Use semantic version and prevent crash if version is missing
* [Pull request #151](https://github.com/gazebosim/gz-fuel-tools/pull/151)

1. Document `IGN_FUEL_CACHE_PATH` on command line
1. Document `GZ_FUEL_CACHE_PATH` on command line
* [Pull request #149](https://github.com/gazebosim/gz-fuel-tools/pull/149)

1. Support editing/patching model files
Expand Down
2 changes: 1 addition & 1 deletion INSTALL_WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ need to [disable the Windows firewall](http://windows.microsoft.com/en-us/window
nmake install


You should now have an installation of Gazebo Fuel-Tools in gz-ws/ign-fuel-tools/build/install.
You should now have an installation of Gazebo Fuel-Tools in gz-ws/gz-fuel-tools/build/install.

## Run tests

Expand Down
4 changes: 2 additions & 2 deletions api.md.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Gazebo @IGN_DESIGNATION_CAP@
## Gazebo @GZ_DESIGNATION_CAP@

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

## License
Expand Down
4 changes: 2 additions & 2 deletions conf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/fuel${PROJECT_VERSION_MAJOR}.yaml" @ONLY)

# Install the yaml configuration files in an unversioned location.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/fuel${PROJECT_VERSION_MAJOR}.yaml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/fuel${PROJECT_VERSION_MAJOR}.yaml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)

# Install config.yaml
install (FILES config.yaml DESTINATION
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}/)
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}/)
31 changes: 0 additions & 31 deletions configure.bat

This file was deleted.

8 changes: 4 additions & 4 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
find_package(Doxygen)

if (DOXYGEN_FOUND)
configure_file(${CMAKE_SOURCE_DIR}/doc/ignition.in
${CMAKE_BINARY_DIR}/ignition.dox @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/doc/gz.in
${CMAKE_BINARY_DIR}/gz.dox @ONLY)

configure_file(${CMAKE_SOURCE_DIR}/doc/tutorials.in
${CMAKE_BINARY_DIR}/tutorials.dox @ONLY)

add_custom_target(doc ALL
# Generate the API documentation
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/ignition.dox
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/gz.dox
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}

COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/tutorials.dox

COMMENT "Generating API documentation with Doxygen" VERBATIM)

install(FILES ${CMAKE_BINARY_DIR}/doc/${PROJECT_NAME_LOWER}.tag.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ignition/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gz/${PROJECT_NAME_LOWER}_${PROJECT_VERSION_MINOR})
endif()
6 changes: 3 additions & 3 deletions doc/gz.in
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.

LAYOUT_FILE = "@IGNITION_CMAKE_DOXYGEN_DIR@/layout.xml"
LAYOUT_FILE = "@GZ_CMAKE_DOXYGEN_DIR@/layout.xml"

# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
Expand Down Expand Up @@ -2079,7 +2079,7 @@ SKIP_FUNCTION_MACROS = NO
# the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here.

TAGFILES = "@IGNITION_CMAKE_DOXYGEN_DIR@/cppreference.tag.xml = http://en.cppreference.com/w" \
TAGFILES = "@GZ_CMAKE_DOXYGEN_DIR@/cppreference.tag.xml = http://en.cppreference.com/w" \
"GZ-MSGS_DOXYGEN_TAGFILE@ = @GZ-MSGS_API_URL@"

# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
Expand Down Expand Up @@ -2432,4 +2432,4 @@ GENERATE_LEGEND = YES
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_CLEANUP = YES
DOT_CLEANUP = YES
4 changes: 2 additions & 2 deletions doc/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h2>API Reference</h2>
</div>
</header>

<nav class="ign-navigation mdl-navigation">
<nav class="gz-navigation mdl-navigation">
<a class="mdl-navigation__link" href="annotated.html">
<i class="mdl-color-text--grey-400 material-icons"
role="presentation">list</i>Class List</a>
Expand Down Expand Up @@ -58,4 +58,4 @@ <h2>API Reference</h2>
</div>

<main class="mdl-layout__content mdl-color--white">
<div id="top">
<div id="top">
2 changes: 1 addition & 1 deletion doc/tutorials.in
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.

LAYOUT_FILE = "@IGNITION_CMAKE_DOXYGEN_DIR@/layout.xml"
LAYOUT_FILE = "@GZ_CMAKE_DOXYGEN_DIR@/layout.xml"

# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
Expand Down
19 changes: 0 additions & 19 deletions example/configure.bat

This file was deleted.

2 changes: 1 addition & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/Helpers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ std::string uriToPath(const gz::common::URI &_uri);
}
}

// IGNITION_FUEL_TOOLS_HELPERS_HH_
// GZ_FUEL_TOOLS_HELPERS_HH_
#endif
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/config.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@

#define GZ_FUEL_TOOLS_VERSION_HEADER "Gazebo Fuel Tools, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2017 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n"

#define GZ_FUEL_INITIAL_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}/"
#define GZ_FUEL_INITIAL_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}/"

#endif
6 changes: 3 additions & 3 deletions src/FuelClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ ModelIter FuelClient::Models(const ModelIdentifier &_id) const
return localIter;

// TODO(nkoenig) try to fetch model directly from a server
// Note: ign-fuel-server doesn't like URLs ending in /
// Note: gz-fuel-server doesn't like URLs ending in /
common::URIPath path;
if (!_id.Name().empty() && !_id.Owner().empty())
path = path / _id.Owner() / "models" / _id.Name();
Expand Down Expand Up @@ -432,7 +432,7 @@ WorldIter FuelClient::Worlds(const WorldIdentifier &_id) const

gzmsg << _id.UniqueName() << " not found in cache, attempting download\n";

// Note: ign-fuel-server doesn't like URLs ending in /
// Note: gz-fuel-server doesn't like URLs ending in /
common::URIPath path;
if (!_id.Name().empty())
path = path / _id.Owner() / "worlds" / _id.Name();
Expand Down Expand Up @@ -1699,7 +1699,7 @@ bool FuelClientPrivate::FillModelForm(const std::string &_pathToModelDir,
_form.emplace("owner", _owner);
}

// \todo(nkoenig) The ign-fuelserver expects an integer number for the
// \todo(nkoenig) The gz-fuelserver expects an integer number for the
// license information. The fuelserver should be modified to accept
// a string. Otherwise, we have to bake into each client a mapping of
// license name to integer.
Expand Down
7 changes: 3 additions & 4 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
# Note that the major version of the library is included in the name.
# Ex: cmdfuel0.rb
if (APPLE)
set(IGN_LIBRARY_NAME lib${PROJECT_NAME_LOWER}.dylib)
set(GZ_LIBRARY_NAME lib${PROJECT_NAME_LOWER}.dylib)
elseif(MSVC)
set(IGN_LIBRARY_NAME ${PROJECT_NAME_LOWER}.dll)
set(GZ_LIBRARY_NAME ${PROJECT_NAME_LOWER}.dll)
else()
set(IGN_LIBRARY_NAME lib${PROJECT_NAME_LOWER}.so)
set(GZ_LIBRARY_NAME lib${PROJECT_NAME_LOWER}.so)
endif()

configure_file(
"cmdfuel.rb.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmdfuel${PROJECT_VERSION_MAJOR}.rb" @ONLY)


# Install the ruby command line library in an unversioned location.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmdfuel${PROJECT_VERSION_MAJOR}.rb DESTINATION lib/ruby/gz)
6 changes: 3 additions & 3 deletions src/cmd/cmdfuel.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end
require 'optparse'

# Constants.
LIBRARY_NAME = '@IGN_LIBRARY_NAME@'
LIBRARY_NAME = '@GZ_LIBRARY_NAME@'
LIBRARY_VERSION = '@PROJECT_VERSION_FULL@'
MAX_PARALLEL_JOBS = 16

Expand Down Expand Up @@ -76,7 +76,7 @@ COMMANDS = { 'fuel' =>
COMMON_OPTIONS + "\n\n" +
"Environment variables: \n"\
" GZ_FUEL_CACHE_PATH Path to the cache where resources are \n"\
" downloaded to. Defaults to $HOME/.ignition/fuel \n"
" downloaded to. Defaults to $HOME/.gz/fuel \n"
}

SUBCOMMANDS = {
Expand Down Expand Up @@ -452,7 +452,7 @@ class Cmd
end
rescue
puts "Library error: Problem running [#{options['subcommand']}]() "\
"from @IGN_LIBRARY_NAME@."
"from @GZ_LIBRARY_NAME@."
end # begin
end # execute
end # class
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 Gazebo @IGN_DESIGNATION_CAP@ tutorials. These tutorials
Welcome to the Gazebo @GZ_DESIGNATION_CAP@ tutorials. These tutorials
will guide you through the process of understanding the capabilities of the
Gazebo @IGN_DESIGNATION_CAP@ library and how to use the library effectively.
Gazebo @GZ_DESIGNATION_CAP@ library and how to use the library effectively.


**The tutorials**
Expand Down
Loading

0 comments on commit d0efe10

Please sign in to comment.