mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 05:39:30 +08:00
087ef910dd
* [protobuf] Update to 3.20.1 * x-add-version * [protobuf] Fix Linux build error * x-add-version * update protobuf to 3.21.2 and fix build error * x-add-version * Update protobuf.json * add version * x-add-version * fix gazebo build error * x-add-version * update gazebo version * update versions db Co-authored-by: Lily Wang <v-lilywang@microsoft.com> Co-authored-by: Victor Romero <viromer@microsoft.com>
22 lines
896 B
Diff
22 lines
896 B
Diff
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
|
|
index 5e9a2c4..8eaa6e0 100644
|
|
--- a/src/google/protobuf/compiler/command_line_interface.cc
|
|
+++ b/src/google/protobuf/compiler/command_line_interface.cc
|
|
@@ -261,12 +261,15 @@ void AddDefaultProtoPaths(
|
|
std::pair<std::string, std::string>("", path + "/include"));
|
|
return;
|
|
}
|
|
- // Check if the upper level directory has an "include" subdirectory.
|
|
+ // change "'$/bin' is next to 'include'" assumption to "'$/bin/tools' is next to 'include'"
|
|
+ for (int i = 0; i < 2; i++)
|
|
+ {
|
|
pos = path.find_last_of("/\\");
|
|
if (pos == std::string::npos || pos == 0) {
|
|
return;
|
|
}
|
|
path = path.substr(0, pos);
|
|
+ }
|
|
if (IsInstalledProtoPath(path + "/include")) {
|
|
paths->push_back(
|
|
std::pair<std::string, std::string>("", path + "/include"));
|