summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-10-30 12:19:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-10-30 12:20:16 (GMT)
commit14563cb7dcc95b0fc2c9089b27239502a8755c75 (patch)
tree36958b39aa9dd7d47a0fea388fb1e1b8f3e71406
parente3747a2d4be427e97af01ca1cce1c6641d4dff74 (diff)
parentd7f7bf08cdea9ee82cb26a3476aacb7a65bfc350 (diff)
downloadCMake-14563cb7dcc95b0fc2c9089b27239502a8755c75.zip
CMake-14563cb7dcc95b0fc2c9089b27239502a8755c75.tar.gz
CMake-14563cb7dcc95b0fc2c9089b27239502a8755c75.tar.bz2
Merge topic 'FindProtobuf-restore-protoc-include-path' into release-3.28
d7f7bf08cd FindProtobuf: Fix protoc include path regression Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Matias Lopez <mlopez203@bloomberg.net> Merge-request: !8922
-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)