From 7a38f0269929d9c4ac00416ab523d77c59f8aa69 Mon Sep 17 00:00:00 2001 From: Pavel Punsky Date: Mon, 22 Aug 2022 16:27:21 -0700 Subject: [PATCH] Fix cmake build on macOS (#949) macOS does not have `pthread_barrier_*` so need to define `TURN_NO_THREAD_BARRIERS` as a workaround Fixes #946 Tests plan: - run cmake to generate make files - run make to build turnserver - run `examples/run_tests.sh` and pass successfully --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76ff6ebb..6e134172 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,10 @@ IF(MSVC) add_compile_options("$<$:/utf-8>") ENDIF(MSVC) +IF(APPLE) + add_compile_definitions("TURN_NO_THREAD_BARRIERS=1") +ENDIF() + include(CMakePackageConfigHelpers) include(GNUInstallDirs) include(GenerateExportHeader)