File: use_pkgconfig_for_gphoto2.patch

package info (click to toggle)
kamera 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,380 kB
  • sloc: cpp: 2,028; xml: 175; makefile: 3; sh: 2
file content (33 lines) | stat: -rw-r--r-- 1,085 bytes parent folder | download | duplicates (5)
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
From: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Thu, 21 Apr 2016 02:54:10 +0200
Subject: use_pkgconfig_for_gphoto2

---
 FindGphoto2.cmake | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/FindGphoto2.cmake b/FindGphoto2.cmake
index 2bd4e10..08a2495 100644
--- a/FindGphoto2.cmake
+++ b/FindGphoto2.cmake
@@ -47,6 +47,20 @@ else()
         endforeach()
 
         set(GPHOTO2_INCLUDE_DIRS ${GPHOTO2PORT_INCLUDE_DIR} ${GPHOTO2_INCLUDE_DIR} )
+    else()
+        find_package(PkgConfig QUIET)
+        PKG_CHECK_MODULES(PC_GPHOTO2 QUIET libgphoto2_port)
+        PKG_CHECK_MODULES(PC_GPHOTO2PORT QUIET libgphoto2)
+
+        foreach(_library ${PC_GPHOTO2PORT_LIBRARIES})
+            set(GPHOTO2_LIBRARIES ${GPHOTO2_LIBRARIES} "-l${_library}")
+        endforeach()
+        foreach(_library ${PC_GPHOTO2_LIBRARIES})
+            set(GPHOTO2_LIBRARIES ${GPHOTO2_LIBRARIES} "-l${_library}")
+        endforeach()
+
+        set(GPHOTO2_INCLUDE_DIRS
+            ${PC_GPHOTO2PORT_INCLUDE_DIRS} ${PC_GPHOTO2_INCLUDE_DIRS})
 
     endif()