Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Commit 94786bb

Browse files
committed
generate_rosjava_messages cmake api needs the rosjava environment.
This makes sure the call to set environment variables occurs when generating rosjava messages. Does this under the hood so the user doesn't have to make a second api call to the rosjava catkin api.
1 parent b40bb20 commit 94786bb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ project(genjava)
99
# Find Package
1010
##############################################################################
1111

12-
find_package(catkin REQUIRED COMPONENTS genmsg)
12+
find_package(catkin REQUIRED COMPONENTS genmsg rosjava_build_tools)
1313

1414
##############################################################################
1515
# Catkin
1616
##############################################################################
1717

1818
catkin_package(
19-
CATKIN_DEPENDS genmsg
19+
CATKIN_DEPENDS genmsg rosjava_build_tools
2020
CFG_EXTRAS
2121
genjava-extras.cmake
2222
genjava-catkin-api.cmake

cmake/genjava-catkin-api.cmake.em

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ macro(generate_rosjava_messages)
2929
if(ARG_UNPARSED_ARGUMENTS)
3030
message(FATAL_ERROR "generate_rosjava_messages() called with unused arguments: ${ARG_UNPARSED_ARGUMENTS}")
3131
endif()
32+
catkin_rosjava_env_setup()
3233
set(ROS_GRADLE_VERBOSE $ENV{ROS_GRADLE_VERBOSE})
3334
if(ROS_GRADLE_VERBOSE)
3435
set(verbosity "--verbosity")

0 commit comments

Comments
 (0)