Skip to content

Commit

Permalink
Bump main to gz-msgs 12.0.0~pre1 (#468)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero authored Oct 10, 2024
1 parent 53712ed commit af39e88
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(gz-msgs11 VERSION 11.0.0)
project(gz-msgs12 VERSION 12.0.0)

#============================================================================
# Find gz-cmake
Expand All @@ -17,7 +17,7 @@ find_package(gz-cmake4 REQUIRED)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

gz_configure_project(VERSION_SUFFIX
gz_configure_project(VERSION_SUFFIX pre1
CONFIG_EXTRAS "gz-msgs-extras.cmake.in")

#============================================================================
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Gazebo Msgs 12.x

### Gazebo Msgs 12.0.0 (20XX-XX-XX)

## Gazebo Msgs 11.x

### Gazebo Msgs 11.0.0 (2024-09-25)
Expand Down
2 changes: 1 addition & 1 deletion core/src/MessageFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ MessageFactory::MessagePtr MessageFactory::New(
{
std::cerr << "Message (" << kGzMsgsPrefix + type
<< ") was retrieved with non-fully qualified name. "
<< "This behavior is deprecated in msgs11" << std::endl;
<< "This behavior is deprecated in msgs12" << std::endl;
}
}
return ret;
Expand Down
4 changes: 2 additions & 2 deletions examples/generating_custom_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ project(generating_custom_messages VERSION 1.0.0)
#============================================================================
find_package(gz-cmake4 REQUIRED)

find_package(gz-msgs11 REQUIRED)
find_package(gz-msgs12 REQUIRED)
# Define a variable 'GZ_MSGS_VER' holding the version number
set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR})
set(GZ_MSGS_VER ${gz-msgs12_VERSION_MAJOR})

# Define a variable 'MSGS_PROTOS' listing the .proto files
set(MSGS_PROTOS
Expand Down
4 changes: 2 additions & 2 deletions examples/using_gz_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ project(using_gz_msgs VERSION 1.0.0)
#============================================================================
find_package(gz-cmake4 REQUIRED)

find_package(gz-msgs11 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR})
find_package(gz-msgs12 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs12_VERSION_MAJOR})

add_executable(${PROJECT_NAME} main.cc)
target_link_libraries(${PROJECT_NAME} PRIVATE gz-msgs${GZ_MSGS_VER})
Expand Down
4 changes: 2 additions & 2 deletions examples/using_gz_msgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ The example in this folder demonstrates how to use messages as part of your buil
To use messages as part of your project, simply find the gz-msgs package

```
find_package(gz-msgs11 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR}
find_package(gz-msgs12 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs12_VERSION_MAJOR}
```

And link the messages library to your library or executable
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>gz-msgs11</name>
<version>11.0.0</version>
<name>gz-msgs12</name>
<version>12.0.0</version>
<description>Gazebo Messages: Protobuf messages and functions for robot applications</description>
<maintainer email="[email protected]">Carlos Agüero</maintainer>
<license>Apache License 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Append `_configured` to the file name so it doesn't interfere with tests.
# This happens because pytest will load the `gz.msgs` package from the build directory
# (because there's an __init__.py file there) instead of being redirected to
# `gz.msgs11` in the install directory, which is the intent of this `__init__.py` file.
# `gz.msgs12` in the install directory, which is the intent of this `__init__.py` file.
set(python_init_file ${PROJECT_BINARY_DIR}/python/gz/${GS_DESIGNATION}/__init__.py_configured)
configure_file(${PROJECT_SOURCE_DIR}/python/src/__init__.py.in ${python_init_file})

Expand Down
2 changes: 1 addition & 1 deletion python/test/basic_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs12.vector3d_pb2 import Vector3d

import unittest

Expand Down
2 changes: 1 addition & 1 deletion tutorials/cppgetstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
project(gz-msgs-example)
# Find the Gazebo msgs library
find_package(gz-msgs11 QUIET REQUIRED)
find_package(gz-msgs12 QUIET REQUIRED)
add_executable(gz-msgs-example main.cc)
target_link_libraries(gz-msgs-example ${GZ-MSGS_LIBRARIES})
Expand Down
10 changes: 5 additions & 5 deletions tutorials/message_generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ The code for this example can be found in the `gz-msgs` [repository](https://git


The `cmake` functionality is exported from the `gz-msgs` library, via the `gz-cmake` [`extras` functionality](https://github.com/gazebosim/gz-cmake/pull/345).
To make the functions available, simply `find_package(gz-msgs11)` in your `CMakeLists.txt`:
To make the functions available, simply `find_package(gz-msgs12)` in your `CMakeLists.txt`:

```cmake
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
project(my_custom_package VERSION 0.0.1)
find_package(gz-cmake4 REQUIRED)
find_package(gz-msgs11 REQUIRED)
find_package(gz-msgs12 REQUIRED)
```


Expand Down Expand Up @@ -215,16 +215,16 @@ gz_msgs_generate_messages(
# List of proto files to process
MSGS_PROTOS ${MSGS_PROTOS}
# Depenency on gz-msgs
DEPENDENCIES gz-msgs11::gz-msgs11
DEPENDENCIES gz-msgs12::gz-msgs12
)
```

In order to reduce the amount of edits needed upon a version change of `gz-msgs`, it is common to:

- Define a variable `GZ_MSGS_VER`, holding the version number:
```cmake
find_package(gz-msgs11 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR})
find_package(gz-msgs12 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs12_VERSION_MAJOR})
```
- And change the dependency line in above code block to:
```cmake
Expand Down

0 comments on commit af39e88

Please sign in to comment.