Skip to content
Snippets Groups Projects
Commit f42d94da authored by Amin Bandali's avatar Amin Bandali Committed by Adrien Béraud
Browse files

build/cmake: Set variables needed by pkg-config files.

Up until now, these were only set by the GNU Build System in
configure.ac, and so the pkg-config files generated from CMake builds
did not have the right Libs.private and Requires.private, especially
useful when linking statically.
parent 2418b355
No related branches found
No related tags found
No related merge requests found
...@@ -67,9 +67,11 @@ if (NOT MSVC) ...@@ -67,9 +67,11 @@ 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)
set(jsoncpp_lib ", jsoncpp")
list (APPEND opendht_SOURCES list (APPEND opendht_SOURCES
src/base64.h src/base64.h
src/base64.cpp src/base64.cpp
...@@ -86,6 +88,7 @@ if (NOT MSVC) ...@@ -86,6 +88,7 @@ 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()
...@@ -96,6 +99,7 @@ if (NOT MSVC) ...@@ -96,6 +99,7 @@ if (NOT MSVC)
message(STATUS "Found OpenSSL ${OPENSSL_VERSION} ${OPENSSL_INCLUDE_DIRS}") message(STATUS "Found OpenSSL ${OPENSSL_VERSION} ${OPENSSL_INCLUDE_DIRS}")
include_directories(SYSTEM ${OPENSSL_INCLUDE_DIRS}) include_directories(SYSTEM ${OPENSSL_INCLUDE_DIRS})
link_directories (${OPENSSL_LIBRARY_DIRS}) link_directories (${OPENSSL_LIBRARY_DIRS})
set(openssl_lib ", openssl")
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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment