move clock_gettime check out
This commit is contained in:
parent
158281bdfe
commit
70e6be3d6e
@ -283,8 +283,11 @@ endif()
|
||||
if(WIN32)
|
||||
set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32)
|
||||
endif()
|
||||
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
|
||||
if (HAVE_CLOCK_GETTIME)
|
||||
add_definitions(-DHAVE_CLOCK_GETTIME)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
|
||||
if (HAVE_CLOCK_GETTIME)
|
||||
set(OPENSSL_LIBS ${OPENSSL_LIBS} rt)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user