summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-08-07 09:52:22 +0200
committerSander Vrijders <sander@ouroboros.rocks>2023-08-23 13:09:10 +0200
commita7bbe9841bb1633fab84428252b16bf4d938932f (patch)
tree7796e11eda37880d851342f6f1fb7b9e200a8ee0 /src/lib
parentd99ab9755b08db8b6c021f8358dbb0b460ebd383 (diff)
downloadouroboros-a7bbe9841bb1633fab84428252b16bf4d938932f.tar.gz
ouroboros-a7bbe9841bb1633fab84428252b16bf4d938932f.zip
build: Link libcrypt and fix cmake compatibility
Compatibility with versions of CMake older than 3.5 is deprecated from CMake 3.27 onwards, and will be removed from a future version. Calls to cmake_minimum_required() or cmake_policy() that set the policy version to an older value now issue a deprecation diagnostic. Fixed by indicating a max tested value for cmake_minimum_required(). Changed linking with OpenSSL to link with libcrypto only, we don't require libssl. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 1a585249..ac5367ab 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -123,6 +123,7 @@ endif ()
if (NOT HAVE_OPENSSL_RNG)
set(OPENSSL_INCLUDE_DIR "")
set(OPENSSL_LIBRARIES "")
+ set(OPENSSL_CRYPTO_LIBRARY "")
endif ()
if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
@@ -145,8 +146,8 @@ if (NOT ((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR APPLE OR
endif ()
mark_as_advanced(LIBRT_LIBRARIES LIBPTHREAD_LIBRARIES
- LIBGCRYPT_LIBRARIES OPENSSL_LIBRARIES SYS_RND_INCLUDE_DIR
- LIBGCRYPT_INCLUDE_DIR SYS_RND_HDR)
+ LIBGCRYPT_LIBRARIES OPENSSL_LIBRARIES OPENSSL_CRYPTO_LIBRARY
+ SYS_RND_INCLUDE_DIR LIBGCRYPT_INCLUDE_DIR SYS_RND_HDR)
set(SHM_BUFFER_SIZE 4096 CACHE STRING
"Number of blocks in packet buffer, must be a power of 2")
@@ -301,7 +302,7 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug*")
endif ()
target_link_libraries(ouroboros-common ${LIBRT_LIBRARIES}
- ${LIBPTHREAD_LIBRARIES} ${PROTOBUF_C_LIBRARY} ${OPENSSL_LIBRARIES}
+ ${LIBPTHREAD_LIBRARIES} ${PROTOBUF_C_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}
${LIBGCRYPT_LIBRARIES} ${FUSE_LIBRARIES})
target_link_libraries(ouroboros-dev ouroboros-common)