From 35cffc497d8db3cf3eee35c1513e3435558f056b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 30 Jun 2024 10:13:51 +0100 Subject: [PATCH] cmake: Add POSIX threads support --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f03b5d6505d..3a6d73e956d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,12 @@ target_link_libraries(core_interface INTERFACE $<$:core_interface_debug> ) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) +target_link_libraries(core_base_interface INTERFACE + Threads::Threads +) + include(cmake/introspection.cmake) # TODO: The `CMAKE_SKIP_BUILD_RPATH` variable setting can be deleted