Skip to content

Commit

Permalink
Rename CMake project to gz (#168)
Browse files Browse the repository at this point in the history
* Rename CMake project to gz

Signed-off-by: Louise Poubel <[email protected]>

* Migrate IGNITION- CMake variables

Signed-off-by: methylDragon <[email protected]>

Co-authored-by: methylDragon <[email protected]>
  • Loading branch information
chapulina and methylDragon authored Jun 27, 2022
1 parent ec5244d commit f350f3b
Show file tree
Hide file tree
Showing 18 changed files with 91 additions and 91 deletions.
74 changes: 37 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-launch6 VERSION 6.0.0)
project(gz-launch6 VERSION 6.0.0)

#============================================================================
# Find ignition-cmake
# Find gz-cmake
#============================================================================
find_package(ignition-cmake3 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
find_package(gz-cmake3 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})

#============================================================================
# Configure the project
Expand All @@ -34,19 +34,19 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)

#--------------------------------------
# Find ignition-common
gz_find_package(ignition-common5 REQUIRED PRIVATE)
set(IGN_COMMON_MAJOR_VER ${ignition-common5_VERSION_MAJOR})
# Find gz-common
gz_find_package(gz-common5 REQUIRED PRIVATE)
set(GZ_COMMON_VER ${gz-common5_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 ignition-plugin
gz_find_package(ignition-plugin2 REQUIRED_BY launch COMPONENTS loader register)
set(IGN_PLUGIN_MAJOR_VER ${ignition-plugin2_VERSION_MAJOR})
# Find gz-plugin
gz_find_package(gz-plugin2 REQUIRED_BY launch COMPONENTS loader register)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})

#--------------------------------------
# Find if gz command is available
Expand All @@ -58,24 +58,24 @@ else()
endif()

#--------------------------------------
# Find ignition-transport
gz_find_package(ignition-transport12 REQUIRED)
set(IGN_TRANSPORT_MAJOR_VER ${ignition-transport12_VERSION_MAJOR})
# Find gz-transport
gz_find_package(gz-transport12 REQUIRED)
set(GZ_TRANSPORT_VER ${gz-transport12_VERSION_MAJOR})

#--------------------------------------
# Find ignition-msgs
gz_find_package(ignition-msgs9 REQUIRED)
set(IGN_MSGS_MAJOR_VER ${ignition-msgs9_VERSION_MAJOR})
# Find gz-msgs
gz_find_package(gz-msgs9 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs9_VERSION_MAJOR})

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

#--------------------------------------
# Find ignition-gui
gz_find_package(ignition-gui7 REQUIRED)
set(IGN_GUI_MAJOR_VER ${ignition-gui7_VERSION_MAJOR})
# Find gz-gui
gz_find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})
gz_find_package (Qt5
COMPONENTS
Core
Expand All @@ -85,9 +85,9 @@ gz_find_package (Qt5
PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2")

#--------------------------------------
# Find ignition-gazebo
gz_find_package(ignition-gazebo7 REQUIRED PRIVATE COMPONENTS gui)
set(IGN_GAZEBO_MAJOR_VER ${ignition-gazebo7_VERSION_MAJOR})
# Find gz-sim
gz_find_package(gz-sim7 REQUIRED PRIVATE COMPONENTS gui)
set(GZ_SIM_VER ${gz-sim7_VERSION_MAJOR})

gz_pkg_check_modules(websockets libwebsockets)
if (NOT websockets_FOUND)
Expand Down Expand Up @@ -128,13 +128,13 @@ gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
TAGFILES
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
"${IGNITION-MSGS_DOXYGEN_TAGFILE} = ${IGNITION-MSGS_API_URL}"
"${IGNITION-PHYSICS_DOXYGEN_TAGFILE} = ${IGNITION-PHYSICS_API_URL}"
"${IGNITION-PLUGIN_DOXYGEN_TAGFILE} = ${IGNITION-PLUGIN_API_URL}"
"${IGNITION-TRANSPORT_DOXYGEN_TAGFILE} = ${IGNITION-TRANSPORT_API_URL}"
"${IGNITION-SENSORS_DOXYGEN_TAGFILE} = ${IGNITION-SENSORS_API_URL}"
"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}"
"${IGNITION-GAZEBO_DOXYGEN_TAGFILE} = ${IGNITION-GAZEBO_API_URL}"
"${IGNITION-GUI_DOXYGEN_TAGFILE} = ${IGNITION-GUI_API_URL}"
"${GZ-MATH_DOXYGEN_TAGFILE} = ${GZ-MATH_API_URL}"
"${GZ-MSGS_DOXYGEN_TAGFILE} = ${GZ-MSGS_API_URL}"
"${GZ-PHYSICS_DOXYGEN_TAGFILE} = ${GZ-PHYSICS_API_URL}"
"${GZ-PLUGIN_DOXYGEN_TAGFILE} = ${GZ-PLUGIN_API_URL}"
"${GZ-TRANSPORT_DOXYGEN_TAGFILE} = ${GZ-TRANSPORT_API_URL}"
"${GZ-SENSORS_DOXYGEN_TAGFILE} = ${GZ-SENSORS_API_URL}"
"${GZ-COMMON_DOXYGEN_TAGFILE} = ${GZ-COMMON_API_URL}"
"${GZ-GAZEBO_DOXYGEN_TAGFILE} = ${GZ-GAZEBO_API_URL}"
"${GZ-GUI_DOXYGEN_TAGFILE} = ${GZ-GUI_API_URL}"
)
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
* [Pull request 16](https://github.com/gazebosim/gz-launch/pull/16)
* [Pull request 28](https://github.com/gazebosim/gz-launch/pull/28)

1. Add PKGCONFIG information to ignition-tools ign_find_package
1. Add PKGCONFIG information to ignition-tools gz_find_package
* [Pull request 44](https://github.com/gazebosim/gz-launch/pull/44)

1. Depend on ign-msgs6, ign-transport9
Expand Down Expand Up @@ -184,7 +184,7 @@
* Modernize Github Actions CI.
* [Pull request 42](https://github.com/gazebosim/gz-launch/pull/42)

1. Add PKGCONFIG information to ignition-tools ign_find_package
1. Add PKGCONFIG information to ignition-tools gz_find_package
* [Pull Request 44](https://github.com/gazebosim/gz-launch/pull/44)

1. Fix factory.gz launch file
Expand Down
10 changes: 5 additions & 5 deletions plugins/gazebo_factory/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set (plugin ignition-launch-gazebo-factory)
set (plugin gz-launch-gazebo-factory)
set (sources GazeboFactory.cc)

string (TOLOWER ${plugin} plugin_lower)
Expand All @@ -7,10 +7,10 @@ add_library(${plugin_lower} SHARED ${sources})
target_link_libraries(${plugin_lower}
PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
ignition-gazebo${IGN_GAZEBO_MAJOR_VER}::ignition-gazebo${IGN_GAZEBO_MAJOR_VER}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
gz-sim${GZ_SIM_VER}::gz-sim${GZ_SIM_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-transport${GZ_TRANSPORT_VER}::core
gz-plugin${GZ_PLUGIN_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
4 changes: 2 additions & 2 deletions plugins/gazebo_factory/GazeboFactory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace gz
///
/// # Example usage
/// <plugin name="gz::launch::GazeboFactory"
/// filename="ignition-launch-gazebo-factory">
/// filename="gz-launch-gazebo-factory">
///
/// <spawn>
/// <!-- Name to give the model -->
Expand All @@ -49,7 +49,7 @@ namespace gz
/// <include>
/// <uri>https://fuel.ignitionrobotics.org/1.0/openrobotics/models/X2 UGV/1</uri>
/// <!-- Publish robot state information -->
/// <plugin filename="ignition-gazebo-state-publisher-system"
/// <plugin filename="gz-sim-state-publisher-system"
/// name="gz::sim::systems::StatePublisher"></plugin>
/// </include>
/// </sdf>
Expand Down
16 changes: 8 additions & 8 deletions plugins/gazebo_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set (plugin ignition-launch-gazebogui)
set (plugin gz-launch-gazebogui)
set (sources GazeboGui.cc)

string (TOLOWER ${plugin} plugin_lower)
Expand All @@ -7,13 +7,13 @@ add_library(${plugin_lower} SHARED ${sources})
target_link_libraries(${plugin_lower}
PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
ignition-gazebo${IGN_GAZEBO_MAJOR_VER}
ignition-gazebo${IGN_GAZEBO_MAJOR_VER}::gui
ignition-gazebo${IGN_GAZEBO_MAJOR_VER}::ignition-gazebo${IGN_GAZEBO_MAJOR_VER}
ignition-gui${IGN_GUI_MAJOR_VER}::ignition-gui${IGN_GUI_MAJOR_VER}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
gz-sim${GZ_SIM_VER}
gz-sim${GZ_SIM_VER}::gui
gz-sim${GZ_SIM_VER}::gz-sim${GZ_SIM_VER}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-transport${GZ_TRANSPORT_VER}::core
gz-plugin${GZ_PLUGIN_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/gazebo_gui/GazeboGui.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace gz
/// <!-- The GUI wants to be in its own process, so wrap the plugin -->
/// <executable_wrapper>
/// <plugin name="gz::launch::GazeboGui"
/// filename="ignition-launch-gazebogui">
/// filename="gz-launch-gazebogui">
///
/// <!-- Elements parsed by ign-launch -->
///
Expand Down
10 changes: 5 additions & 5 deletions plugins/gazebo_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set (plugin ignition-launch-gazebo)
set (plugin gz-launch-gazebo)
set (sources GazeboServer.cc)

string (TOLOWER ${plugin} plugin_lower)
Expand All @@ -7,10 +7,10 @@ add_library(${plugin_lower} SHARED ${sources})
target_link_libraries(${plugin_lower}
PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
ignition-gazebo${IGN_GAZEBO_MAJOR_VER}::ignition-gazebo${IGN_GAZEBO_MAJOR_VER}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
gz-sim${GZ_SIM_VER}::gz-sim${GZ_SIM_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-transport${GZ_TRANSPORT_VER}::core
gz-plugin${GZ_PLUGIN_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
4 changes: 2 additions & 2 deletions plugins/gazebo_server/GazeboServer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ namespace gz
/// # Example usage
/// <!-- Run the gazebo server with a set of plugins -->
/// <plugin name="gz::launch::GazeboServer"
/// filename="ignition-launch-gazebo">
/// filename="gz-launch-gazebo">
/// <!-- The SDF file to run -->
/// <world_file>diff_drive.sdf</world_file>
///
/// <!-- The physics system -->
/// <plugin entity_name="<%= worldName %>"
/// entity_type="world"
/// filename="ignition-gazebo-physics-system"
/// filename="gz-sim-physics-system"
/// name="gz::sim::systems::v0::Physics">
/// </plugin>
///
Expand Down
10 changes: 5 additions & 5 deletions plugins/joy_to_twist/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
set (plugin ignition-launch-joytotwist)
set (plugin gz-launch-joytotwist)
set (sources JoyToTwist.cc)

add_library(${plugin} SHARED ${sources})
target_link_libraries(${plugin}
PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-math${IGN_MATH_MAJOR_VER}::ignition-math${IGN_MATH_MAJOR_VER}
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-plugin${GZ_PLUGIN_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/joy_to_twist/JoyToTwist.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace gz
///
/// <!-- Inform gz::Launch about the JoyToTwist plugin -->
/// <plugin name="gz::launch::JoyToTwist"
/// filename=ignition-launch-joytotwist0">
/// filename=gz-launch-joytotwist0">
/// <!-- Incoming topic that publishes
/// gz::msgs::Joystick messages -->
/// <input_topic>/joy</input_topic>
Expand Down
10 changes: 5 additions & 5 deletions plugins/joystick/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
set (plugin ignition-launch-joystick)
set (plugin gz-launch-joystick)
set (sources Joystick.cc)

add_library(${plugin} SHARED ${sources})
target_link_libraries(${plugin}
PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-math${IGN_MATH_MAJOR_VER}::ignition-math${IGN_MATH_MAJOR_VER}
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-transport${GZ_TRANSPORT_VER}::core
gz-plugin${GZ_PLUGIN_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/joystick/Joystick.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace gz
///
/// <!-- Inform gz::Launch about the JoyToTwist plugin -->
/// <plugin name="gz::launch::Joystick"
/// filename="ignition-launch-joystick0">
/// filename="gz-launch-joystick0">
///
/// <!-- Joystick device -->
/// <device>/dev/input/js0</device>
Expand Down
12 changes: 6 additions & 6 deletions plugins/websocket_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (websockets_FOUND)
set (plugin ignition-launch-websocket-server)
set (plugin gz-launch-websocket-server)
set (sources WebsocketServer.cc)

add_library(${plugin} SHARED ${sources})
Expand All @@ -18,11 +18,11 @@ if (websockets_FOUND)
PRIVATE
${websockets_LIBRARIES}
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-common${IGN_COMMON_MAJOR_VER}::graphics
ignition-msgs${IGN_MSGS_MAJOR_VER}::core
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-common${GZ_COMMON_VER}::graphics
gz-msgs${GZ_MSGS_VER}::core
gz-plugin${GZ_PLUGIN_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
Expand Down
2 changes: 1 addition & 1 deletion plugins/websocket_server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Get Started

1. [Install ignition-acropolis](https://gazebosim.org/docs/acropolis/install).
1. [Install gz-acropolis](https://gazebosim.org/docs/acropolis/install).

2. Compile and install ign-launch from source. You will have to `sudo make
install` so that `ign-tools` find the launch.yaml files.
Expand Down
2 changes: 1 addition & 1 deletion plugins/websocket_server/WebsocketServer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace gz
///
/// <!-- Inform gz::Launch about the JoyToTwist plugin -->
/// <plugin name="gz::launch::WebsocketServer"
/// filename="ignition-launch-joystick0">
/// filename="gz-launch-joystick0">
///
/// <!-- Publication Hz -->
/// <publication_hz>30</publication_hz>
Expand Down
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
# Link the libraries that we always need.
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::loader
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::register
gz-plugin${GZ_PLUGIN_VER}::loader
gz-plugin${GZ_PLUGIN_VER}::register
TINYXML2::TINYXML2
PRIVATE
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-math${IGN_MATH_MAJOR_VER}::ignition-math${IGN_MATH_MAJOR_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
${BACKWARD_LIBRARIES}
)

Expand All @@ -30,7 +30,7 @@ gz_build_tests(TYPE UNIT SOURCES ${gtest_sources}
EXCLUDE_PROJECT_LIB
LIB_DEPS
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
)

add_subdirectory(cmd)
6 changes: 3 additions & 3 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ add_library(gz STATIC gz.cc)
target_include_directories(gz PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(gz PUBLIC
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
)

set(launch_executable ign-launch)
add_executable(${launch_executable} launch_main.cc)
target_link_libraries(${launch_executable}
gz
ignition-utils${IGN_UTILS_VER}::cli
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
gz-utils${GZ_UTILS_VER}::cli
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
)

install(
Expand Down
Loading

0 comments on commit f350f3b

Please sign in to comment.