Skip to content

Commit

Permalink
Attempt to fix protoc sarch logic for cases when custom path in use
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-odintsov committed Apr 4, 2023
1 parent d2eca38 commit 9b7bd79
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,13 @@ if (ENABLE_GOBGP_SUPPORT)

# Switch to use to configuration supplied by custom Protobuf installation as it may be better
set(FIND_PACKAGE_MODE_PROTOBUF "CONFIG")

# Apparently it's required to set this flag because without this flag set it cannot find protoc when custom library path is in use
# https://github.com/protocolbuffers/protobuf/issues/1931
set(protobuf_MODULE_COMPATIBLE true)
endif()


# https://cmake.org/cmake/help/latest/module/FindProtobuf.html
find_package(Protobuf ${FIND_PACKAGE_MODE_PROTOBUF} REQUIRED ${DISABLE_DEFAULT_PATH_SEARCH_VAR})

Expand Down

0 comments on commit 9b7bd79

Please sign in to comment.