summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndré Apitzsch <andre.apitzsch@etit.tu-chemnitz.de>2023-10-27 15:12:46 (GMT)
committerBrad King <brad.king@kitware.com>2023-10-27 15:41:28 (GMT)
commitd7f7bf08cdea9ee82cb26a3476aacb7a65bfc350 (patch)
tree36958b39aa9dd7d47a0fea388fb1e1b8f3e71406 /Modules
parente3747a2d4be427e97af01ca1cce1c6641d4dff74 (diff)
downloadCMake-d7f7bf08cdea9ee82cb26a3476aacb7a65bfc350.zip
CMake-d7f7bf08cdea9ee82cb26a3476aacb7a65bfc350.tar.gz
CMake-d7f7bf08cdea9ee82cb26a3476aacb7a65bfc350.tar.bz2
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindProtobuf.cmake6
1 files 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)