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

Rename CMake project to gz #355

Merged
merged 5 commits into from
Jun 26, 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
38 changes: 19 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-physics6 VERSION 6.0.0)
project(gz-physics6 VERSION 6.0.0)

#============================================================================
# Find ignition-cmake
# Find gz-cmake
#============================================================================
find_package(ignition-cmake3 REQUIRED)
find_package(gz-cmake3 REQUIRED)

#============================================================================
# Configure the project
Expand All @@ -35,26 +35,26 @@ endif()
message(STATUS "\n\n-- ====== Finding Dependencies ======")

#--------------------------------------
# Find ignition-common
gz_find_package(ignition-common5
# Find gz-common
gz_find_package(gz-common5
COMPONENTS geospatial graphics profiler
REQUIRED_BY heightmap mesh dartsim tpe tpelib bullet)
set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR})
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})

#--------------------------------------
# Find ignition-math
gz_find_package(ignition-math7 REQUIRED COMPONENTS eigen3)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})
# Find gz-math
gz_find_package(gz-math7 REQUIRED COMPONENTS eigen3)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-plugin
gz_find_package(ignition-plugin2 REQUIRED COMPONENTS all)
set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR})
# Find gz-plugin
gz_find_package(gz-plugin2 REQUIRED COMPONENTS all)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})

#--------------------------------------
# Find ignition-utils
gz_find_package(ignition-utils2 REQUIRED COMPONENTS cli)
set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR})
# Find gz-utils
gz_find_package(gz-utils2 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR})

#--------------------------------------
# Find Eigen
Expand Down Expand Up @@ -93,7 +93,7 @@ set(GZ_PHYSICS_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/resources")

# Plugin install dirs
set(GZ_PHYSICS_ENGINE_INSTALL_DIR
${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins
${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins
)

#============================================================================
Expand All @@ -119,9 +119,9 @@ gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
TAGFILES
"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}"
"${IGNITION-PLUGIN_DOXYGEN_TAGFILE} = ${IGNITION-PLUGIN_API_URL}"
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
"${GZ-COMMON_DOXYGEN_TAGFILE} = ${GZ-COMMON_API_URL}"
"${GZ-PLUGIN_DOXYGEN_TAGFILE} = ${GZ-PLUGIN_API_URL}"
"${GZ-MATH_DOXYGEN_TAGFILE} = ${GZ-MATH_API_URL}"
)

file(COPY ${CMAKE_SOURCE_DIR}/tutorials/img/ DESTINATION ${CMAKE_BINARY_DIR}/doxygen/html/img/)
8 changes: 4 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
1. Ignore invalid joint commands
* [Pull request #137](https://github.com/gazebosim/gz-physics/pull/137)

1. Fix CONFIG arg in ign_find_package(DART) call
1. Fix CONFIG arg in gz_find_package(DART) call
* [Pull request #119](https://github.com/gazebosim/gz-physics/pull/119)

### Gazebo Physics 3.1.0 (2020-10-18)
Expand All @@ -297,7 +297,7 @@
1. Support nested models in TPE
* [Pull request 86](https://github.com/gazebosim/gz-physics/pull/86)

1. Fix CONFIG arg in ign_find_package(DART) call
1. Fix CONFIG arg in gz_find_package(DART) call
* [Pull request 119](https://github.com/gazebosim/gz-physics/pull/119)

1. Fix getting model bounding box in world frame in TPE
Expand Down Expand Up @@ -388,7 +388,7 @@
1. Support getting shape AABB in world frame
* [Pull request #127](https://github.com/gazebosim/gz-physics/pull/127)

1. Fix CONFIG arg in `ign_find_package(DART)` call
1. Fix CONFIG arg in `gz_find_package(DART)` call
* [Pull request #119](https://github.com/gazebosim/gz-physics/pull/119)

### Gazebo Physics 2.3.0 (2020-09-29)
Expand Down Expand Up @@ -512,7 +512,7 @@
1. Ignore invalid joint commands in the dartsim-plugin
* [Pull request 137](https://github.com/gazebosim/gz-physics/pull/137)

1. Fix CONFIG arg in ign_find_package(DART) call
1. Fix CONFIG arg in gz_find_package(DART) call
* [Pull request 119](https://github.com/gazebosim/gz-physics/pull/119)

### Gazebo Physics 1.9.0 (2020-09-17)
Expand Down
12 changes: 6 additions & 6 deletions bullet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ target_link_libraries(${bullet_plugin}
${features}
${PROJECT_LIBRARY_TARGET_NAME}-sdf
${PROJECT_LIBRARY_TARGET_NAME}-mesh
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-math${IGN_MATH_VER}::eigen3)
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-math${GZ_MATH_VER}::eigen3)

# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir
install(TARGETS ${bullet_plugin} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR})
Expand All @@ -32,8 +32,8 @@ install(
DIRECTORY include/
DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}")

# The library created by `gz_add_component` includes the ign-physics version
# (i.e. libignition-physics1-name-plugin.so), but for portability,
# The library created by `gz_add_component` includes the gz-physics version
# (i.e. libgz-physics1-name-plugin.so), but for portability,
# we also install an unversioned symlink into the same versioned folder.
set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${bullet_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand All @@ -56,8 +56,8 @@ gz_build_tests(
SOURCES ${test_sources}
LIB_DEPS
${features}
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
gz-plugin${GZ_PLUGIN_VER}::loader
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
${PROJECT_LIBRARY_TARGET_NAME}-sdf
${PROJECT_LIBRARY_TARGET_NAME}-mesh
TEST_LIST tests)
Expand Down
20 changes: 10 additions & 10 deletions dartsim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ target_link_libraries(${dartsim_plugin}
${PROJECT_LIBRARY_TARGET_NAME}-sdf
${PROJECT_LIBRARY_TARGET_NAME}-heightmap
${PROJECT_LIBRARY_TARGET_NAME}-mesh
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-common${IGN_COMMON_VER}::geospatial
ignition-math${IGN_MATH_VER}::eigen3
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-common${GZ_COMMON_VER}::geospatial
gz-math${GZ_MATH_VER}::eigen3
PRIVATE
# We need to link this, even when the profiler isn't used to get headers.
ignition-common${IGN_COMMON_VER}::profiler
gz-common${GZ_COMMON_VER}::profiler
)

# The ignition fork of DART contains additional code that allows customizing
# The Gazebo fork of DART contains additional code that allows customizing
# contact constraints. We check for the presence of "ContactSurface.hpp", which
# was added to enable these customizations, to detect if the feature is
# available.
Expand All @@ -61,8 +61,8 @@ endif()
# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir
install(TARGETS ${dartsim_plugin} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR})

# The library created by `gz_add_component` includes the ign-physics version
# (i.e. libignition-physics1-name-plugin.so), but for portability,
# The library created by `gz_add_component` includes the gz-physics version
# (i.e. libgz-physics1-name-plugin.so), but for portability,
# we also install an unversioned symlink into the same versioned folder.
set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${dartsim_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand All @@ -83,9 +83,9 @@ gz_build_tests(
SOURCES ${test_sources}
LIB_DEPS
${features}
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-common${IGN_COMMON_VER}::geospatial
gz-plugin${GZ_PLUGIN_VER}::loader
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-common${GZ_COMMON_VER}::geospatial
${PROJECT_LIBRARY_TARGET_NAME}-sdf
${PROJECT_LIBRARY_TARGET_NAME}-heightmap
${PROJECT_LIBRARY_TARGET_NAME}-mesh
Expand Down
4 changes: 2 additions & 2 deletions dartsim/src/CustomFeatures.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*
*/

#ifndef IGNITION_PHYSICS_SRC_CUSTOMFEATURES_HH
#define IGNITION_PHYSICS_SRC_CUSTOMFEATURES_HH
#ifndef GZ_PHYSICS_SRC_CUSTOMFEATURES_HH
#define GZ_PHYSICS_SRC_CUSTOMFEATURES_HH

#include <gz/physics/Implements.hh>

Expand Down
2 changes: 1 addition & 1 deletion dartsim/worlds/falling.world
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<sdf version="1.6">
<world name="default">
<plugin
filename="libignition-gazebo-physics-system.so"
filename="libgz-sim-physics-system.so"
name="gz::gazebo::systems::v0::Physics">
</plugin>
<model name="sphere">
Expand Down
12 changes: 6 additions & 6 deletions examples/hello_world_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(ign-physics-hello-world-loader)

find_package(ignition-plugin2 REQUIRED COMPONENTS all)
set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR})
find_package(gz-plugin2 REQUIRED COMPONENTS all)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})

find_package(ignition-physics6 REQUIRED)
set(IGN_PHYSICS_VER ${ignition-physics6_VERSION_MAJOR})
find_package(gz-physics6 REQUIRED)
set(GZ_PHYSICS_VER ${gz-physics6_VERSION_MAJOR})

add_executable(hello_world_loader hello_world_loader.cc)
target_link_libraries(hello_world_loader
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-physics${IGN_PHYSICS_VER}::ignition-physics${IGN_PHYSICS_VER})
gz-plugin${GZ_PLUGIN_VER}::loader
gz-physics${GZ_PHYSICS_VER}::gz-physics${GZ_PHYSICS_VER})
4 changes: 2 additions & 2 deletions examples/hello_world_loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ For example, if you have the Gazebo Physics plugin for DART compiled, find
where it's installed with:

~~~
find / | grep libignition-physics-dartsim-plugin.so
find / | grep libgz-physics-dartsim-plugin.so
~~~

You may find more than one file. Choose one of them, and load it with
the example loader like this:

~~~
cd examples/hello_world_loader/build
./hello_world_loader <path_to>/libignition-physics-dartsim-plugin.so
./hello_world_loader <path_to>/libgz-physics-dartsim-plugin.so
~~~

And you'll see the engine info:
Expand Down
10 changes: 5 additions & 5 deletions examples/hello_world_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(ign-physics-hello-world-plugin)

find_package(ignition-plugin2 REQUIRED COMPONENTS all)
set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR})
find_package(gz-plugin2 REQUIRED COMPONENTS all)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})

find_package(ignition-physics6 REQUIRED)
set(IGN_PHYSICS_VER ${ignition-physics6_VERSION_MAJOR})
find_package(gz-physics6 REQUIRED)
set(GZ_PHYSICS_VER ${gz-physics6_VERSION_MAJOR})

add_library(HelloWorldPlugin SHARED HelloWorldPlugin.cc)
target_link_libraries(HelloWorldPlugin
PRIVATE
ignition-physics${IGN_PHYSICS_VER}::ignition-physics${IGN_PHYSICS_VER})
gz-physics${GZ_PHYSICS_VER}::gz-physics${GZ_PHYSICS_VER})
14 changes: 7 additions & 7 deletions examples/simple_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(ign-physics-simple-plugin)

find_package(ignition-plugin2 REQUIRED COMPONENTS all)
set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR})
find_package(gz-plugin2 REQUIRED COMPONENTS all)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})

find_package(ignition-physics6 REQUIRED)
set(IGN_PHYSICS_VER ${ignition-physics6_VERSION_MAJOR})
find_package(gz-physics6 REQUIRED)
set(GZ_PHYSICS_VER ${gz-physics6_VERSION_MAJOR})

add_library(SimplePlugin SHARED plugin.cc EntityManagementFeatures.cc)
target_link_libraries(SimplePlugin
PRIVATE
ignition-physics${IGN_PHYSICS_VER}::ignition-physics${IGN_PHYSICS_VER})
gz-physics${GZ_PHYSICS_VER}::gz-physics${GZ_PHYSICS_VER})

add_executable(PluginTest EntityManagementFeatures_TEST.cc)
target_link_libraries(PluginTest
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-physics${IGN_PHYSICS_VER}::ignition-physics${IGN_PHYSICS_VER})
gz-plugin${GZ_PLUGIN_VER}::loader
gz-physics${GZ_PHYSICS_VER}::gz-physics${GZ_PHYSICS_VER})

target_compile_definitions(PluginTest PRIVATE
"simple_plugin_LIB=\"$<TARGET_FILE:SimplePlugin>\"")
2 changes: 1 addition & 1 deletion heightmap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gz_add_component(heightmap INTERFACE

target_link_libraries(${heightmap}
INTERFACE
ignition-common${IGN_COMMON_VER}::geospatial)
gz-common${GZ_COMMON_VER}::geospatial)

install(
DIRECTORY include/
Expand Down
2 changes: 1 addition & 1 deletion include/gz/physics/FrameSemantics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace gz
{
/////////////////////////////////////////////////
/// \brief FrameSemantics is an Interface that can be provided by
/// ignition-physics engines to provide users with easy ways to express
/// gz-physics engines to provide users with easy ways to express
/// kinematic quantities in terms of frames and compute their values in
/// terms of arbitrary frames of reference.
class GZ_PHYSICS_VISIBLE FrameSemantics : public virtual Feature
Expand Down
2 changes: 1 addition & 1 deletion include/gz/physics/Geometry.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace gz
{
namespace physics
{
/// \brief This is used by ignition-physics to represent rigid body
/// \brief This is used by gz-physics to represent rigid body
/// transforms in 2D or 3D simulations. The precision can be chosen as
/// float or scalar.
template <typename Scalar, std::size_t Dim>
Expand Down
2 changes: 1 addition & 1 deletion mesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gz_add_component(mesh INTERFACE

target_link_libraries(${mesh}
INTERFACE
ignition-common${IGN_COMMON_VER}::graphics)
gz-common${GZ_COMMON_VER}::graphics)

install(
DIRECTORY include/
Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)

target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
${ignition-math${IGN_MATH_VER}_LIBRARIES}
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
ignition-plugin${IGN_PLUGIN_VER}::register
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-plugin${GZ_PLUGIN_VER}::register
Eigen3::Eigen)

gz_build_tests(
Expand All @@ -15,5 +15,5 @@ gz_build_tests(

if(TARGET UNIT_FindFeatures_TEST)
target_link_libraries(UNIT_FindFeatures_TEST
ignition-plugin${IGN_PLUGIN_VER}::loader)
gz-plugin${GZ_PLUGIN_VER}::loader)
endif()
4 changes: 2 additions & 2 deletions test/common_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ foreach(test ${tests})

target_link_libraries(${TEST_TYPE}_${test}
PUBLIC
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-common5::ignition-common5
gz-plugin${GZ_PLUGIN_VER}::loader
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
${PROJECT_LIBRARY_TARGET_NAME}
gtest
gtest_main
Expand Down
2 changes: 1 addition & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gz_build_tests(
SOURCES ${tests}
LIB_DEPS
Eigen3::Eigen
ignition-plugin${IGN_PLUGIN_VER}::loader
gz-plugin${GZ_PLUGIN_VER}::loader
TEST_LIST list)

if (BUILD_TESTING)
Expand Down
2 changes: 1 addition & 1 deletion test/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if (DART_FOUND)
add_library(MockDoublePendulum SHARED DARTDoublePendulum.cc)
target_link_libraries(MockDoublePendulum PRIVATE ignition-common${IGN_COMMON_VER}::core)
target_link_libraries(MockDoublePendulum PRIVATE gz-common${GZ_COMMON_VER}::core)
endif()
add_library(MockEntities SHARED MockEntities.cc)
add_library(MockFrames SHARED frames.cc)
Expand Down
Loading