diff --git a/CMakeLists.txt b/CMakeLists.txt index a9d3650..28a99f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,10 +42,10 @@ endif() if(WIN32) list(APPEND DEPLIBS ws2_32 iphlpapi) else() - check_library_exists(pthread pthread_create "" HAVE_LIBTHREAD) - check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET) + check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) check_library_exists(rt clock_gettime "" HAVE_LIBRT) - if (HAVE_LIBTHREAD) + check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET) + if (HAVE_LIBPTHREAD) list(APPEND DEPLIBS pthread) endif() if (HAVE_LIBRT)