Skip to content

Commit

Permalink
Set protobuf_MODULE_COMPATIBLE before any find_package call
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Aug 5, 2021
1 parent 9fbb9b9 commit 49790e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ endif()
# Search for project-specific dependencies
#============================================================================

# This option is needed to use the PROTOBUF_GENERATE_CPP
# in case protobuf is found with the CMake config files
# It needs to be set before any find_package(...) call
# as protobuf could be find transitively by any dependency
set(protobuf_MODULE_COMPATIBLE TRUE)

ign_find_package(sdformat11 REQUIRED VERSION 11.2.1)
set(SDF_VER ${sdformat11_VERSION_MAJOR})

Expand Down Expand Up @@ -136,8 +142,6 @@ set(IGN_UTILS_VER ${ignition-utils1_VERSION_MAJOR})

#--------------------------------------
# Find protobuf
# Module is needed to use the PROTOBUF_GENERATE_CPP
set(protobuf_MODULE_COMPATIBLE TRUE)
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
VERSION ${REQ_PROTOBUF_VER}
Expand Down

0 comments on commit 49790e3

Please sign in to comment.