From 8650a5cca70d0be1446b0bdd603c1057c97f72b4 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 5 Aug 2021 16:39:49 +0200 Subject: [PATCH] Set protobuf_MODULE_COMPATIBLE before any find_package call Signed-off-by: Silvio Traversaro --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) 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})