We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90a640a commit 1dc9be1Copy full SHA for 1dc9be1
1 file changed
google/cloud/bigtable/CMakeLists.txt
@@ -54,6 +54,14 @@ google_cloud_cpp_add_common_options(bigtable_common_options)
54
list(APPEND PROTOBUF_IMPORT_DIRS "${PROJECT_THIRD_PARTY_DIR}/googleapis"
55
"${PROJECT_SOURCE_DIR}")
56
57
+# Sometimes (this happens often with vcpkg) protobuf is installed in a non-
58
+# standard directory. We need to find out where, and then add that directory to
59
+# the search path for protos.
60
+find_path(PROTO_INCLUDE_DIR google/protobuf/descriptor.proto)
61
+if (PROTO_INCLUDE_DIR)
62
+ list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}")
63
+endif ()
64
+
65
# Include the functions to compile proto files.
66
include(CompileProtos)
67
protobuf_generate_cpp(
0 commit comments