diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index 9a79b74e..9b7db143 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,7 @@ if(NOT WIN32) option(USE_NACL "Use NaCl library instead of libsodium") endif() -if(NOT USE_NACL) - set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARY}) -else() +if(USE_NACL) find_package(NaCl REQUIRED) include_directories(${NACL_INCLUDE_DIR}) @@ -26,6 +24,10 @@ if(NOT WIN32) find_package(SODIUM REQUIRED) endif() +if(NOT USE_NACL) + set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARY}) +endif() + macro(linkCoreLibraries exe_name) add_dependencies(${exe_name} core) if(WIN32)