diff options
author | Brent Cook <bcook@openbsd.org> | 2015-09-11 09:11:08 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-09-11 09:11:08 -0500 |
commit | 2af9873259a4b55d774bf8848cc8847ca401132f (patch) | |
tree | 837b4ef54b30a65f1a1336a1437a6e35e351dbaa /CMakeLists.txt | |
parent | ef01eb71d1f8df58d1ae56b2e6e7dc631bb68428 (diff) | |
download | portable-2af9873259a4b55d774bf8848cc8847ca401132f.tar.gz portable-2af9873259a4b55d774bf8848cc8847ca401132f.tar.bz2 portable-2af9873259a4b55d774bf8848cc8847ca401132f.zip |
add -lrt check for linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aed0c9..ed9cb1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,5 +1,6 @@ | |||
1 | cmake_minimum_required (VERSION 2.8) | 1 | cmake_minimum_required (VERSION 2.8) |
2 | include(CheckFunctionExists) | 2 | include(CheckFunctionExists) |
3 | include(CheckLibraryExists) | ||
3 | include(CheckIncludeFiles) | 4 | include(CheckIncludeFiles) |
4 | 5 | ||
5 | project (LibreSSL) | 6 | project (LibreSSL) |
@@ -159,6 +160,12 @@ set(OPENSSL_LIBS ssl crypto) | |||
159 | if(CMAKE_HOST_WIN32) | 160 | if(CMAKE_HOST_WIN32) |
160 | set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32) | 161 | set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32) |
161 | endif() | 162 | endif() |
163 | if(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
164 | check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) | ||
165 | if (HAVE_CLOCK_GETTIME) | ||
166 | set(OPENSSL_LIBS ${OPENSSL_LIBS} rt) | ||
167 | endif() | ||
168 | endif() | ||
162 | 169 | ||
163 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR MSVC)) | 170 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR MSVC)) |
164 | set(BUILD_SHARED true) | 171 | set(BUILD_SHARED true) |