diff --git a/CMakeLists.txt b/CMakeLists.txt index a377e89..36344a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ OPTION(N2N_OPTION_USE_PCAPLIB "USE PCAP Library" OFF) OPTION(N2N_OPTION_USE_ZSTD "USE ZSTD Library" OFF) -if(N2N_OPTION_USE_PTHREAD AND (DEFINED WIN32)) +if(N2N_OPTION_USE_PTHREAD) find_library(PTHREAD_LIB pthread) if(PTHREAD_LIB) ADD_DEFINITIONS("-DHAVE_PTHREAD") @@ -54,7 +54,7 @@ if(N2N_OPTION_USE_PTHREAD AND (DEFINED WIN32)) MESSAGE(WARNING "libpthread not found.") set(N2N_OPTION_USE_PTHREAD OFF) endif(PTHREAD_LIB) -endif(N2N_OPTION_USE_PTHREAD AND (DEFINED WIN32)) +endif(N2N_OPTION_USE_PTHREAD) if(NOT DEFINED N2N_OPTION_USE_OPENSSL) set(N2N_OPTION_USE_OPENSSL OFF) @@ -144,9 +144,9 @@ add_library(n2n STATIC src/curve25519.c) -if(N2N_OPTION_USE_PTHREAD AND (DEFINED WIN32)) +if(N2N_OPTION_USE_PTHREAD) target_link_libraries(n2n pthread) -endif(N2N_OPTION_USE_PTHREAD AND (DEFINED WIN32)) +endif(N2N_OPTION_USE_PTHREAD) if(N2N_OPTION_USE_OPENSSL) # target_link_libraries(n2n crypto)