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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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