-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
opencv: fix cross compliation by patching protobuf #415591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
47 changes: 47 additions & 0 deletions
47
pkgs/development/libraries/protobuf/cmake-configure-protoc-exe-21.patch
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| commit 649864521c0e09f3a3bd7939d91ba1ef488946dc | ||
| Author: phanirithvij <phanirithvij2000@gmail.com> | ||
| Date: Tue Jun 10 10:58:49 2025 +0530 | ||
|
|
||
| [CMake] Allow for protoc executable to be configured | ||
|
|
||
| copied from commit 3163111b6fb1da08b9d6ad75518d91b89cd03bbf | ||
|
|
||
| Signed-off-by: phanirithvij <phanirithvij2000@gmail.com> | ||
|
|
||
| diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in | ||
| index 61669118c..55f32516f 100644 | ||
| --- a/cmake/protobuf-config.cmake.in | ||
| +++ b/cmake/protobuf-config.cmake.in | ||
| @@ -11,7 +11,7 @@ function(protobuf_generate) | ||
| include(CMakeParseArguments) | ||
|
|
||
| set(_options APPEND_PATH) | ||
| - set(_singleargs LANGUAGE OUT_VAR EXPORT_MACRO PROTOC_OUT_DIR PLUGIN PLUGIN_OPTIONS) | ||
| + set(_singleargs LANGUAGE OUT_VAR EXPORT_MACRO PROTOC_OUT_DIR PLUGIN PLUGIN_OPTIONS PROTOC_EXE) | ||
| if(COMMAND target_sources) | ||
| list(APPEND _singleargs TARGET) | ||
| endif() | ||
| @@ -92,6 +92,11 @@ function(protobuf_generate) | ||
| endforeach() | ||
| endif() | ||
|
|
||
| + if(NOT protobuf_generate_PROTOC_EXE) | ||
| + # Default to using the CMake executable | ||
| + set(protobuf_generate_PROTOC_EXE protobuf::protoc) | ||
| + endif() | ||
| + | ||
| foreach(DIR ${protobuf_generate_IMPORT_DIRS}) | ||
| get_filename_component(ABS_PATH ${DIR} ABSOLUTE) | ||
| list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) | ||
| @@ -146,9 +151,9 @@ function(protobuf_generate) | ||
|
|
||
| add_custom_command( | ||
| OUTPUT ${_generated_srcs} | ||
| - COMMAND protobuf::protoc | ||
| + COMMAND ${protobuf_generate_PROTOC_EXE} | ||
| ARGS ${protobuf_generate_PROTOC_OPTIONS} --${protobuf_generate_LANGUAGE}_out ${_plugin_options}:${protobuf_generate_PROTOC_OUT_DIR} ${_plugin} ${_protobuf_include_path} ${_abs_file} | ||
| - DEPENDS ${_abs_file} protobuf::protoc | ||
| + DEPENDS ${_abs_file} ${protobuf_generate_PROTOC_EXE} | ||
| COMMENT ${_comment} | ||
| VERBATIM ) | ||
| endforeach() |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.