diff --git a/CMakeLists.txt b/CMakeLists.txt index c5776fbc0..d11061921 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,7 @@ else () add_definitions(-DBADVPN_THREADWORK_USE_PTHREAD) add_definitions(-DBADVPN_THREAD_SAFE=1) - link_libraries(rt) + link_libraries(rt pthread) if (EMSCRIPTEN) add_definitions(-DBADVPN_EMSCRIPTEN) diff --git a/threadwork/CMakeLists.txt b/threadwork/CMakeLists.txt index 5f223ae0b..c9bbe025e 100644 --- a/threadwork/CMakeLists.txt +++ b/threadwork/CMakeLists.txt @@ -1,6 +1 @@ -set(BADVPN_THREADWORK_EXTRA_LIBS) -if (BADVPN_THREADWORK_USE_PTHREAD) - list(APPEND BADVPN_THREADWORK_EXTRA_LIBS pthread) -endif () - -badvpn_add_library(threadwork "system" "${BADVPN_THREADWORK_EXTRA_LIBS}" BThreadWork.c) +badvpn_add_library(threadwork "system" "" BThreadWork.c)