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)
|