Debian Codegraph @

vcpkg/overlay_ports/opencv4/0009-fix-protobuf.patch

raw
1 --- a/cmake/OpenCVFindProtobuf.cmake
2 +++ b/cmake/OpenCVFindProtobuf.cmake
3 @@ -34,7 +34,7 @@ else()
4 set(protobuf_MODULE_COMPATIBLE ON)
5
6 unset(Protobuf_VERSION CACHE)
7 - find_package(Protobuf QUIET CONFIG)
8 + find_package(Protobuf CONFIG REQUIRED)
9 if(NOT Protobuf_FOUND)
10 find_package(Protobuf QUIET)
11 endif()
12 @@ -97,6 +97,7 @@ if(HAVE_PROTOBUF)
13 unset( __location)
14 if(TARGET "${Protobuf_LIBRARIES}")
15 get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_RELEASE)
16 + get_target_property(__location_debug "${Protobuf_LIBRARIES}" IMPORTED_LOCATION_DEBUG)
17 if(NOT __location)
18 get_target_property(__location "${Protobuf_LIBRARIES}" IMPORTED_LOCATION)
19 endif()
20 @@ -112,5 +113,5 @@ if(HAVE_PROTOBUF)
21 endif()
22 list(APPEND CUSTOM_STATUS_protobuf " Protobuf:"
23 BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})"
24 - ELSE "${__location} (${Protobuf_VERSION})")
25 + ELSE "optimized ${__location} debug ${__location_debug} ; version (${Protobuf_VERSION})")
26 endif()