Link to GnuTLS if shared lib.

This commit is contained in:
Nicolás Ortega Froysa 2017-08-18 17:06:17 -05:00
parent 6a2798d0c4
commit 7b35893778
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -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()