File: 0027-cmake-populate-pkgconfig-file-with-prefix.patch

package info (click to toggle)
rtl-sdr 0.6.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,660 kB
  • sloc: ansic: 9,305; python: 102; sh: 86; makefile: 74; xml: 57
file content (29 lines) | stat: -rw-r--r-- 813 bytes parent folder | download
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
From ed0317e6a58c098874ac58b769cf2e609c18d9a5 Mon Sep 17 00:00:00 2001
From: Eric Wild <ewild@sysmocom.de>
Date: Sun, 2 Aug 2020 23:48:42 +0200
Subject: [PATCH 27/33] cmake: populate pkgconfig file with prefix

Previously the prefix and related paths were not set.
---
 CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2def354..d000f52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -157,6 +157,11 @@ IF(CMAKE_CROSSCOMPILING)
     UNSET(RTLSDR_PC_LIBS)
 ENDIF(CMAKE_CROSSCOMPILING)
 
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix \${prefix})
+set(includedir \${prefix}/include)
+set(libdir \${exec_prefix}/lib)
+
 CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/librtlsdr.pc.in
     ${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
-- 
2.30.2