From 7b35893778b13cfbd10f7dcf532669d2539d110b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Fri, 18 Aug 2017 17:06:17 -0500 Subject: [PATCH] Link to GnuTLS if shared lib. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e75bd73..7c01a94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}") option(BUILD_SHARED_LIB "Whether to build a shared object instead of a static." OFF) +find_package(GnuTLS REQUIRED) find_package(PkgConfig REQUIRED) pkg_search_module(OPENDHT REQUIRED opendht) @@ -61,5 +62,6 @@ endif() if(BUILD_SHARED_LIB) target_link_libraries(${TARGET_NAME} + ${GNUTLS_LIBRARIES} ${OPENDHT_LIBRARIES}) endif()