From ed817eb9067976b9d6d134bc0992bbbf883e6675 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 11 Jun 2014 16:43:00 +0200 Subject: Fix error message when ENABLE_LIBSODIUM is set and libsodium is not found --- cmake/check_reqs.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/check_reqs.cmake b/cmake/check_reqs.cmake index 58fb05d..bc081cf 100644 --- a/cmake/check_reqs.cmake +++ b/cmake/check_reqs.cmake @@ -3,7 +3,11 @@ 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") + if(ENABLE_LIBSODIUM) + message(FATAL_ERROR "libsodium is not available, but a selected module needs it") + else(ENABLE_LIBSODIUM) + message(FATAL_ERROR "NaCl is not available, but a selected module needs it") + endif(ENABLE_LIBSODIUM) endif() if(ENABLE_LIBSODIUM) -- cgit v1.2.3