summaryrefslogtreecommitdiffstats
path: root/cmake/check_reqs.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/check_reqs.cmake')
-rw-r--r--cmake/check_reqs.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/check_reqs.cmake b/cmake/check_reqs.cmake
new file mode 100644
index 0000000..ad12ca7
--- /dev/null
+++ b/cmake/check_reqs.cmake
@@ -0,0 +1,12 @@
+set(HAVE_LIBSODIUM FALSE)
+
+get_property(nacl_required GLOBAL PROPERTY NACL_REQUIRED)
+if(${nacl_required})
+ if("${NACL_LIBRARIES}" STREQUAL "")
+ message(FATAL_ERROR "NaCl is not available, but a selected module needs it")
+ endif()
+
+ if(USE_LIBSODIUM)
+ set(HAVE_LIBSODIUM TRUE)
+ endif(USE_LIBSODIUM)
+endif(${nacl_required})