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
|
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Mon, 11 Apr 2022 01:06:00 +0200
Subject: Link against pthread
Forwarded: not-needed
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 033db09..b0d4f5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1402,6 +1402,8 @@ else()
target_link_libraries(unicorn PUBLIC
m
)
+ find_package(Threads REQUIRED)
+ target_link_libraries(unicorn PRIVATE Threads::Threads)
# For static archive
if (BUILD_SHARED_LIBS)
@@ -1413,6 +1415,7 @@ else()
${UNICORN_LINK_LIBRARIES}
m
)
+ target_link_libraries(unicorn_static PRIVATE Threads::Threads)
endif()
set_target_properties(unicorn PROPERTIES
|