Skip to content
Snippets Groups Projects
Commit 53b5c0ec authored by Adrien Béraud's avatar Adrien Béraud
Browse files

build/cmake: export used libraries to .pc file

parent 44a251de
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,7 @@ if (NOT MSVC) ...@@ -63,6 +63,7 @@ if (NOT MSVC)
find_package (Readline 6 REQUIRED) find_package (Readline 6 REQUIRED)
endif () endif ()
pkg_search_module(argon2 REQUIRED libargon2) pkg_search_module(argon2 REQUIRED libargon2)
set(argon2_lib ", libargon2")
pkg_search_module(Jsoncpp jsoncpp) pkg_search_module(Jsoncpp jsoncpp)
if (Jsoncpp_FOUND) if (Jsoncpp_FOUND)
add_definitions(-DOPENDHT_JSONCPP) add_definitions(-DOPENDHT_JSONCPP)
...@@ -82,9 +83,11 @@ if (NOT MSVC) ...@@ -82,9 +83,11 @@ if (NOT MSVC)
add_library(fmt SHARED IMPORTED) add_library(fmt SHARED IMPORTED)
find_library(HTTP_PARSER_LIBRARY http_parser) find_library(HTTP_PARSER_LIBRARY http_parser)
add_library(http_parser SHARED IMPORTED) add_library(http_parser SHARED IMPORTED)
set(http_parser_lib "-lhttp_parser ")
if (NOT Jsoncpp_FOUND) if (NOT Jsoncpp_FOUND)
message(SEND_ERROR "Jsoncpp is required for DHT proxy support") message(SEND_ERROR "Jsoncpp is required for DHT proxy support")
endif() endif()
set(jsoncpp_lib ", jsoncpp")
if (OPENDHT_PROXY_OPENSSL) if (OPENDHT_PROXY_OPENSSL)
# https://cmake.org/cmake/help/latest/module/FindOpenSSL.html # https://cmake.org/cmake/help/latest/module/FindOpenSSL.html
pkg_search_module(OPENSSL REQUIRED openssl) pkg_search_module(OPENSSL REQUIRED openssl)
...@@ -95,6 +98,7 @@ if (NOT MSVC) ...@@ -95,6 +98,7 @@ if (NOT MSVC)
else () else ()
message(SEND_ERROR "OpenSSL is required for DHT proxy as specified") message(SEND_ERROR "OpenSSL is required for DHT proxy as specified")
endif() endif()
set(openssl_lib ", openssl")
endif() endif()
else () else ()
set(OPENDHT_PROXY_OPENSSL OFF) set(OPENDHT_PROXY_OPENSSL OFF)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment