Skip to content

Commit

Permalink
gz-msgs-extras: Do not call find_package(Python3) if gz-msgs<majVer>_…
Browse files Browse the repository at this point in the history
…PYTHON_INTERPRETER is defined

Signed-off-by: Silvio Traversaro <[email protected]>
  • Loading branch information
traversaro authored Oct 2, 2024
1 parent 8456827 commit 3c12926
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gz-msgs-extras.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

# copied from gz-msgs/gz-msgs-extras.cmake

find_package(Python3 REQUIRED COMPONENTS Interpreter)

include(${@PROJECT_NAME@_DIR}/gz_msgs_string_utils.cmake)
include(${@PROJECT_NAME@_DIR}/gz_msgs_protoc.cmake)
include(${@PROJECT_NAME@_DIR}/gz_msgs_factory.cmake)
Expand All @@ -37,6 +35,7 @@ if(NOT DEFINED @PROJECT_NAME@_PROTOC_EXECUTABLE)
set(@PROJECT_NAME@_PROTOC_EXECUTABLE protobuf::protoc)
endif()
if(NOT DEFINED @PROJECT_NAME@_PYTHON_INTERPRETER)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
set(@PROJECT_NAME@_PYTHON_INTERPRETER Python3::Interpreter)
endif()
set(@PROJECT_NAME@_PROTO_GENERATOR_SCRIPT ${@PROJECT_NAME@_INSTALL_PATH}/bin/${PROTO_SCRIPT_NAME})
Expand Down

0 comments on commit 3c12926

Please sign in to comment.