summaryrefslogtreecommitdiffstats
path: root/cmake/check_reqs.cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-03 11:12:42 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-03 11:12:42 +0100
commitb117a60e81c3d67880cd8b0079041c92a0818d96 (patch)
tree8db87c3e0710ce5b2201d7734a93dd3024631b1c /cmake/check_reqs.cmake
parent7fe38b0200979c15cc27a84ab51b2730e7f2d30e (diff)
downloadfastd-b117a60e81c3d67880cd8b0079041c92a0818d96.tar
fastd-b117a60e81c3d67880cd8b0079041c92a0818d96.zip
Allow building without NaCl again
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})