File: 0003-Link-with-pthread.patch

package info (click to toggle)
libopenshot-audio 0.3.2%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,548 kB
  • sloc: cpp: 94,227; java: 1,279; makefile: 18; sh: 4
file content (25 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (2)
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
From: Sebastian Ramacher <sramacher@debian.org>
Date: Fri, 4 Mar 2022 23:05:32 +0100
Subject: Link with pthread

---
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1704d62..badf23d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -282,6 +282,12 @@ target_link_libraries(openshot-audio PUBLIC ${CMAKE_DL_LIBS})
 # Link with atomic
 target_link_libraries(openshot-audio PRIVATE atomic)
 
+# Link with pthread
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+find_package(Threads REQUIRED)
+target_link_libraries(openshot-audio PRIVATE Threads::Threads)
+
 # Create an alias so our EXPORT target name works internally, as well
 add_library(OpenShot::Audio ALIAS openshot-audio)