diff --git a/CMakeLists.txt b/CMakeLists.txt index 614fea3..58e3d7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,10 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${STATIC_BUILD}") set (CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") endif () +if (NOT "${STATIC_BUILD}") + set (CMAKE_EXE_LINKER_FLAGS "-lpthread") +endif () + if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") endif ()