summaryrefslogtreecommitdiff
path: root/media-libs/opencv/files/opencv-4.10.0-dnn-explicitly-include-abseil-cpp.patch
blob: ca63bea5e46ba1fae77e09cc41ac9245b0a8f98f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 980dd32e52da10901094a7f8a5dbe5287a62a602 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Thu, 5 Sep 2024 15:53:36 +0200
Subject: [PATCH] dnn: explicitly include abseil-cpp

Linking against abseil-cpp depended on protobuf exporting all abseil-cpp
libraries via protobuf::libprotobuf public libraries.

Explcitly finding abseil ourselves removes the need for that.

Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>

diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake
index 9228b04..7d9f315 100644
--- a/cmake/OpenCVFindProtobuf.cmake
+++ b/cmake/OpenCVFindProtobuf.cmake
@@ -32,6 +32,7 @@ else()
   # we still need this for command PROTOBUF_GENERATE_CPP.
   set(protobuf_MODULE_COMPATIBLE ON)
 
+  find_package(absl CONFIG REQUIRED)
   unset(Protobuf_VERSION CACHE)
   find_package(Protobuf QUIET CONFIG)
   if(NOT Protobuf_FOUND)
diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
index 562b144..052c4f8 100644
--- a/modules/dnn/CMakeLists.txt
+++ b/modules/dnn/CMakeLists.txt
@@ -144,6 +144,7 @@ list(APPEND libs ${Protobuf_LIBRARIES})
 if(NOT BUILD_PROTOBUF)
   list(APPEND include_dirs ${Protobuf_INCLUDE_DIRS})
 endif()
+list(APPEND libs absl::check)
 
 set(sources_options "")
 
-- 
2.46.0