fengdaolong
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
6 deletions
-
CMakeLists.txt
|
|
@ -40,17 +40,21 @@ add_definitions(-DN2N_VERSION="${N2N_VERSION}" -DN2N_OSNAME="${N2N_OSNAME}") |
|
|
|
OPTION(BUILD_SHARED_LIBS "BUILD Shared Library" OFF) |
|
|
|
|
|
|
|
# N2n specific params |
|
|
|
OPTION(N2N_OPTION_USE_PTHREAD "USE PTHREAD Library" OFF) |
|
|
|
OPTION(N2N_OPTION_USE_PTHREAD "USE PTHREAD Library" ON) |
|
|
|
OPTION(N2N_OPTION_USE_OPENSSL "USE OPENSSL Library" OFF) |
|
|
|
OPTION(N2N_OPTION_USE_PCAPLIB "USE PCAP Library" OFF) |
|
|
|
OPTION(N2N_OPTION_USE_ZSTD "USE ZSTD Library" OFF) |
|
|
|
|
|
|
|
|
|
|
|
find_library(PTHREAD_LIB pthread) |
|
|
|
if(PTHREAD_LIB) |
|
|
|
set(N2N_OPTION_USE_PTHREAD ON) |
|
|
|
ADD_DEFINITIONS("-DHAVE_PTHREAD") |
|
|
|
endif(PTHREAD_LIB) |
|
|
|
if(N2N_OPTION_USE_PTHREAD) |
|
|
|
find_library(PTHREAD_LIB pthread) |
|
|
|
if(PTHREAD_LIB) |
|
|
|
ADD_DEFINITIONS("-DHAVE_PTHREAD") |
|
|
|
else() |
|
|
|
MESSAGE(WARNING "libpthread not found.") |
|
|
|
set(N2N_OPTION_USE_PTHREAD OFF) |
|
|
|
endif(PTHREAD_LIB) |
|
|
|
endif(N2N_OPTION_USE_PTHREAD) |
|
|
|
|
|
|
|
if(NOT DEFINED N2N_OPTION_USE_OPENSSL) |
|
|
|
set(N2N_OPTION_USE_OPENSSL OFF) |
|
|
|