-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenCV] fix protobuf references (#19770)
* [OpenCV] fix protobuf targets * [OpenCV] fix port versions * [OpenCV] fix references
- Loading branch information
Showing
27 changed files
with
68 additions
and
68 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- a/cmake/OpenCVFindProtobuf.cmake | ||
+++ b/cmake/OpenCVFindProtobuf.cmake | ||
@@ -31,7 +31,7 @@ if(BUILD_PROTOBUF) | ||
set(HAVE_PROTOBUF TRUE) | ||
else() | ||
unset(Protobuf_VERSION CACHE) | ||
- find_package(Protobuf QUIET) | ||
+ find_package(Protobuf CONFIG REQUIRED) | ||
|
||
# Backwards compatibility | ||
# Define camel case versions of input variables | ||
@@ -76,6 +76,7 @@ if(HAVE_PROTOBUF) | ||
if(NOT BUILD_PROTOBUF) | ||
if(TARGET "${Protobuf_LIBRARIES}") | ||
get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) | ||
+ get_target_property(__location_debug "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_DEBUG) | ||
if(NOT __location) | ||
get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) | ||
endif() | ||
@@ -87,5 +88,5 @@ if(HAVE_PROTOBUF) | ||
endif() | ||
list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" | ||
BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})" | ||
- ELSE "${__location} (${Protobuf_VERSION})") | ||
+ ELSE "optimized ${__location} debug ${__location_debug} ; version (${Protobuf_VERSION})") | ||
endif() |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- a/cmake/OpenCVFindProtobuf.cmake | ||
+++ b/cmake/OpenCVFindProtobuf.cmake | ||
@@ -31,7 +31,7 @@ if(BUILD_PROTOBUF) | ||
set(HAVE_PROTOBUF TRUE) | ||
else() | ||
unset(Protobuf_VERSION CACHE) | ||
- find_package(Protobuf QUIET) | ||
+ find_package(Protobuf CONFIG REQUIRED) | ||
|
||
# Backwards compatibility | ||
# Define camel case versions of input variables | ||
@@ -76,6 +76,7 @@ if(HAVE_PROTOBUF) | ||
if(NOT BUILD_PROTOBUF) | ||
if(TARGET "${Protobuf_LIBRARIES}") | ||
get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE) | ||
+ get_target_property(__location_debug "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_DEBUG) | ||
if(NOT __location) | ||
get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION) | ||
endif() | ||
@@ -87,5 +88,5 @@ if(HAVE_PROTOBUF) | ||
endif() | ||
list(APPEND CUSTOM_STATUS_protobuf " Protobuf:" | ||
BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})" | ||
- ELSE "${__location} (${Protobuf_VERSION})") | ||
+ ELSE "optimized ${__location} debug ${__location_debug} ; version (${Protobuf_VERSION})") | ||
endif() |
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
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