aboutsummaryrefslogtreecommitdiff
path: root/audio/FAudio/0001-cmake.patch
blob: 37d5e01276de8834289f52921484b3afd658b06f (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
40
41
42
43
44
45
From 931b198dae23863dd2e5c205bd819991a7259d85 Mon Sep 17 00:00:00 2001
From: orbea <orbea@riseup.net>
Date: Wed, 11 Nov 2020 10:05:41 -0800
Subject: [PATCH] cmake: Fix compatiblity with older cmake versions.

IMPORTED_TARGET was only introduced in cmake 3.6 and FAudio
does not build with GStremer versions older than 1.9.2.

Fixes https://github.com/FNA-XNA/FAudio/issues/226

v2: Use _LDFLAGS to ensure linking against the correct gstreamer.
---
 CMakeLists.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb57a672..58da7f18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -142,9 +142,9 @@ if(GSTREAMER)
 
 	# Find GStreamer
 	find_package(PkgConfig)
-	pkg_check_modules(GST REQUIRED IMPORTED_TARGET gstreamer-1.0)
-	pkg_check_modules(GSTAUDIO REQUIRED IMPORTED_TARGET gstreamer-audio-1.0)
-	pkg_check_modules(GSTAPP REQUIRED IMPORTED_TARGET gstreamer-app-1.0)
+	pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.9.2)
+	pkg_check_modules(GSTAUDIO REQUIRED gstreamer-audio-1.0>=1.9.2)
+	pkg_check_modules(GSTAPP REQUIRED gstreamer-app-1.0>=1.9.2)
 
 	# Include/Link GStreamer...
 	target_include_directories(FAudio PRIVATE
@@ -153,9 +153,9 @@ if(GSTREAMER)
 		${GSTAPP_INCLUDE_DIRS}
 	)
 	target_link_libraries(FAudio PRIVATE
-            PkgConfig::GST
-            PkgConfig::GSTAUDIO
-            PkgConfig::GSTAPP
+            ${GST_LDFLAGS}
+            ${GSTAUDIO_LDFLAGS}
+            ${GSTAPP_LDFLAGS}
         )
 endif(GSTREAMER)