blob: 76f5296f808b19f33c442b8ddc6bbf35fa3c1944 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
find_package(BISON 2.5 REQUIRED)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads)
if(NOT CMAKE_USE_PTHREADS_INIT)
MESSAGE(FATAL_ERROR "No pthread support found.")
endif(NOT CMAKE_USE_PTHREADS_INIT)
find_package(PkgConfig REQUIRED)
pkg_check_modules(UECC REQUIRED libuecc>=3)
set(NACL_INCLUDE_DIRS "")
set(NACL_CFLAGS_OTHER "")
set(NACL_LIBRARY_DIRS "")
set(NACL_LIBRARIES "")
set(NACL_LDFLAGS_OTHER "")
if(USE_LIBSODIUM)
pkg_check_modules(SODIUM libsodium)
if(SODIUM_FOUND)
set(NACL_INCLUDE_DIRS "${SODIUM_INCLUDE_DIRS}")
foreach(dir "${SODIUM_INCLUDEDIR}" ${SODIUM_INCLUDE_DIRS})
list(APPEND NACL_INCLUDE_DIRS "${dir}/sodium")
endforeach(dir)
set(NACL_CFLAGS_OTHER "${SODIUM_CFLAGS_OTHER}")
set(NACL_LIBRARY_DIRS "${SODIUM_LIBRARY_DIRS}")
set(NACL_LIBRARIES "${SODIUM_LIBRARIES}")
set(NACL_LDFLAGS_OTHER "${SODIUM_LDFLAGS_OTHER}")
endif(SODIUM_FOUND)
else(USE_LIBSODIUM)
find_package(NaCl)
if(NACL_FOUND)
set(NACL_INCLUDE_DIRS "${NACL_INCLUDE_DIR}")
set(NACL_LIBRARIES "${NACL_LIBRARY}")
endif(NACL_FOUND)
endif(USE_LIBSODIUM)
set_property(GLOBAL PROPERTY NACL_REQUIRED FALSE)
if(USE_OPENSSL)
pkg_check_modules(OPENSSL_CRYPTO REQUIRED libcrypto)
else(USE_OPENSSL)
set(OPENSSL_CRYPTO_INCLUDE_DIRS "")
set(OPENSSL_CRYPTO_CFLAGS_OTHER "")
set(OPENSSL_CRYPTO_LIBRARY_DIRS "")
set(OPENSSL_CRYPTO_LIBRARIES "")
set(OPENSSL_CRYPTO_LDFLAGS_OTHER "")
endif(USE_OPENSSL)
if(WITH_CAPABILITIES)
find_package(CAP REQUIRED)
else(WITH_CAPABILITIES)
set(CAP_INCLUDE_DIR "")
set(CAP_LIBRARY "")
endif(WITH_CAPABILITIES)
|