summaryrefslogtreecommitdiff
path: root/louloulibs/CMakeLists.txt
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-03-06 00:51:43 +0100
committerlouiz’ <louiz@louiz.org>2017-03-06 00:57:33 +0100
commit99a4ddedaf903d27b781341108433ae2d9533ad1 (patch)
tree2662dddda921d84f6fd348e46f154261ad46c17a /louloulibs/CMakeLists.txt
parentd81c3ad5ac2c12130d90044b7597bf962a7cfe9e (diff)
downloadbiboumi-99a4ddedaf903d27b781341108433ae2d9533ad1.tar.gz
biboumi-99a4ddedaf903d27b781341108433ae2d9533ad1.tar.bz2
biboumi-99a4ddedaf903d27b781341108433ae2d9533ad1.tar.xz
biboumi-99a4ddedaf903d27b781341108433ae2d9533ad1.zip
Remove the embedded sha1 code, and use one of botan or gcrypt
This adds a hard dependency on one of Botan or gcrypt. Botan is already a recommended dependency, and gcrypt is probably packaged almost everywhere, so this should not be a big deal. ref #3241
Diffstat (limited to 'louloulibs/CMakeLists.txt')
-rw-r--r--louloulibs/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/louloulibs/CMakeLists.txt b/louloulibs/CMakeLists.txt
index f672833..2268571 100644
--- a/louloulibs/CMakeLists.txt
+++ b/louloulibs/CMakeLists.txt
@@ -33,6 +33,10 @@ elseif(NOT WITHOUT_BOTAN)
find_package(BOTAN)
endif()
+if(NOT BOTAN_FOUND)
+ find_package(GCRYPT REQUIRED)
+endif()
+
if(WITH_UDNS)
find_package(UDNS REQUIRED)
elseif(NOT WITHOUT_UDNS)
@@ -67,6 +71,11 @@ if(BOTAN_FOUND)
set(BOTAN_FOUND ${BOTAN_FOUND} PARENT_SCOPE)
set(BOTAN_INCLUDE_DIRS ${BOTAN_INCLUDE_DIRS} PARENT_SCOPE)
endif()
+if(GCRYPT_FOUND)
+ include_directories(SYSTEM ${GCRYPT_INCLUDE_DIRS})
+ set(GCRYPT_FOUND ${GCRYPT_FOUND} PARENT_SCOPE)
+ set(GCRYPT_INCLUDE_DIRS ${GCRYPT_INCLUDE_DIRS} PARENT_SCOPE)
+endif()
if(UDNS_FOUND)
include_directories(${UDNS_INCLUDE_DIRS})
@@ -117,6 +126,8 @@ add_library(network STATIC ${source_network})
target_link_libraries(network logger)
if(BOTAN_FOUND)
target_link_libraries(network ${BOTAN_LIBRARIES})
+elseif(GCRYPT_FOUND)
+ target_link_libraries(network ${GCRYPT_LIBRARIES})
endif()
if(UDNS_FOUND)
target_link_libraries(network ${UDNS_LIBRARIES})