forked from p4lang/p4c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build with system Protobuf (p4lang#4321)
* Fix build with system Protobuf This sets the flag `protobuf_MODULE_COMPATIBLE` in the Protobuf cmake file, so the Protobuf files expose some variables required by the build, such as `Protobuf_PROTOC_EXECUTABLE`. Furthermore, `Protobuf_LIBRARY` is defined manually as `protobuf::libprotobuf`, because it is only holds the path to the Protobuf library, not the abseil library Protobuf depends on since version 22. Fix p4lang#4316 * Use `Protobuf_INCLUDE_DIRS` with protoc Protobuf does not seem to set Protobuf_INCLUDE_DIR correctly, but we need this variable for generating code with protoc. Instead, we rely on Protobuf_INCLUDE_DIRS and generate a custom utility variable for includes. --------- Co-authored-by: Fabian Ruffy <[email protected]>
- Loading branch information
Showing
5 changed files
with
27 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters