diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e99b0b1a9..1b8ef5601f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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(sdformat9 REQUIRED VERSION 9.3.0) set(SDF_VER ${sdformat9_VERSION_MAJOR})