diff --git a/CMakeLists.txt b/CMakeLists.txt index 4efc5af519e480a7622a1e80631786c7d141e16c..8d909a103106d779f8e1d9c1c0d060ac9dffdf12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ if (NOT OPENDHT_ARGON2) endif () if (OPENDHT_PROXY_SERVER OR OPENDHT_PROXY_CLIENT) find_package(Restbed REQUIRED) - find_package(Jsoncpp REQUIRED) + pkg_search_module(Jsoncpp jsoncpp) endif() # Build flags @@ -84,10 +84,14 @@ endif () if (Nettle_INCLUDE_DIRS) include_directories (SYSTEM "${Nettle_INCLUDE_DIRS}") endif () +if (RESTBED_INCLUDE) + include_directories (SYSTEM "${RESTBED_INCLUDE}") +endif () if (Jsoncpp_INCLUDE_DIRS) include_directories (SYSTEM "${Jsoncpp_INCLUDE_DIRS}") endif () link_directories (${Nettle_LIBRARY_DIRS}) +link_directories (${Jsoncpp_LIBRARY_DIRS}) include_directories ( ./ include/ diff --git a/cmake/FindJsoncpp.cmake b/cmake/FindJsoncpp.cmake deleted file mode 100644 index fccc2da33b82c31d32fd478aa6c06f96f6bb0e7b..0000000000000000000000000000000000000000 --- a/cmake/FindJsoncpp.cmake +++ /dev/null @@ -1,18 +0,0 @@ -find_path (JSONCPP_INCLUDE jsoncpp - HINTS - "/usr/include" - "/usr/local/include" - "/opt/local/include" -) - -if (JSONCPP_INCLUDE) - message(STATUS "${green}Found Jsoncpp: ${JSONCPP_INCLUDE}") -else() - message(FATAL_ERROR "${red}Failed to locate Jsoncpp.}") -endif() - -if (JSONCPP_INCLUDE) - set(JSONCPP_FOUND TRUE) - set(Jsoncpp_LIBRARIES jsoncpp) - set(Jsoncpp_INCLUDE_DIRS ${JSONCPP_INCLUDE}/jsoncpp) -endif()