diff options
Diffstat (limited to 'cmake/FindNaCl.cmake')
-rw-r--r-- | cmake/FindNaCl.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/FindNaCl.cmake b/cmake/FindNaCl.cmake new file mode 100644 index 00000000..cdd6248a --- /dev/null +++ b/cmake/FindNaCl.cmake | |||
@@ -0,0 +1,17 @@ | |||
1 | find_path(NACL_INCLUDE_DIR crypto_box.h | ||
2 | $ENV{NACL_INCLUDE_DIR} /usr/include/nacl/ | ||
3 | DOC "Directory which contain NaCl headers") | ||
4 | |||
5 | find_path(NACL_LIBRARY_DIR libnacl.a | ||
6 | $ENV{NACL_LIBRARY_DIR} /usr/lib/nacl | ||
7 | DOC "Directory which contain libnacl.a, cpucycles.o, and randombytes.o") | ||
8 | |||
9 | if(NACL_LIBRARY_DIR) | ||
10 | set(NACL_LIBRARIES | ||
11 | "${NACL_LIBRARY_DIR}/cpucycles.o" | ||
12 | "${NACL_LIBRARY_DIR}/libnacl.a" | ||
13 | "${NACL_LIBRARY_DIR}/randombytes.o") | ||
14 | endif() | ||
15 | |||
16 | include(FindPackageHandleStandardArgs) | ||
17 | find_package_handle_standard_args(NaCl DEFAULT_MSG NACL_INCLUDE_DIR NACL_LIBRARY_DIR NACL_LIBRARIES) | ||