summaryrefslogtreecommitdiff
path: root/cmake/FindNaCl.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindNaCl.cmake')
-rw-r--r--cmake/FindNaCl.cmake17
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 @@
1find_path(NACL_INCLUDE_DIR crypto_box.h
2 $ENV{NACL_INCLUDE_DIR} /usr/include/nacl/
3 DOC "Directory which contain NaCl headers")
4
5find_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
9if(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")
14endif()
15
16include(FindPackageHandleStandardArgs)
17find_package_handle_standard_args(NaCl DEFAULT_MSG NACL_INCLUDE_DIR NACL_LIBRARY_DIR NACL_LIBRARIES)