diff --git a/shared/CMakeLists.txt b/shared/CMakeLists.txt index afe855d47e..e03926f641 100644 --- a/shared/CMakeLists.txt +++ b/shared/CMakeLists.txt @@ -7,4 +7,11 @@ file(GLOB HIFI_SHARED_SRCS src/*.h src/*.cpp) # create a library and set the property so it can be referenced later add_library(HifiShared ${HIFI_SHARED_SRCS}) -set(HIFI_SHARED_LIBRARY HifiShared) \ No newline at end of file +set(HIFI_SHARED_LIBRARY HifiShared) + +# link required libraries on UNIX +if (UNIX AND NOT APPLE) + find_package(Threads REQUIRED) + + target_link_libraries(HifiShared ${CMAKE_THREAD_LIBS_INIT}) +endif (UNIX AND NOT APPLE) \ No newline at end of file