Fix macos link error (#423)

* Fix macos link error

* Update CMakeLists.txt

* Update CMakeLists.txt
This commit is contained in:
crjc
2022-12-22 17:16:10 +00:00
committed by GitHub
parent b0fd119d14
commit a5d4911a16

View File

@@ -251,7 +251,7 @@ if (WIN32)
endif()
endif()
if (UNIX)
if (UNIX AND NOT APPLE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
target_link_libraries(ixwebsocket PRIVATE Threads::Threads)