From d7f7bf08cdea9ee82cb26a3476aacb7a65bfc350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Fri, 27 Oct 2023 17:12:46 +0200 Subject: FindProtobuf: Fix protoc include path regression This was accidentally broken by commit 31adc11030 (FindProtobuf: Add PLUGIN_OPTIONS and PROTOC_OPTIONS to protobuf_generate, 2023-06-29, v3.28.0-rc1~409^2~2). Fixes: #25368 --- Modules/FindProtobuf.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 008b537..a7ee0c4 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -299,6 +299,8 @@ function(protobuf_generate) list(APPEND _protobuf_include_path -I ${_abs_dir}) endif() endforeach() + else() + set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) endif() foreach(DIR ${protobuf_generate_IMPORT_DIRS}) @@ -309,10 +311,6 @@ function(protobuf_generate) endif() endforeach() - if(NOT _protobuf_include_path) - set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) - endif() - set(_generated_srcs_all) foreach(_proto ${protobuf_generate_PROTOS}) get_filename_component(_abs_file ${_proto} ABSOLUTE) -- cgit v0.12