We don't need libscrypt when linking against sodium.
This commit is contained in:
12
platform-independent/cli-c/CMakeLists.txt
Normal file
12
platform-independent/cli-c/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
project(mpw)
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
set(CMAKE_C_FLAGS "-O3 -DHAS_SODIUM=1")
|
||||
|
||||
include_directories(core cli)
|
||||
file(GLOB SOURCES "core/*.c" "cli/mpw-cli.c")
|
||||
add_executable(mpw ${SOURCES})
|
||||
|
||||
find_library(libsodium REQUIRED)
|
||||
target_link_libraries(mpw sodium)
|
@@ -45,7 +45,13 @@ mpw_color=${mpw_color:-1} # Colorized Identicon, requires libncurses-dev
|
||||
export CFLAGS="-O3 $CFLAGS"
|
||||
export LDFLAGS="$LDFLAGS"
|
||||
|
||||
|
||||
# Distribution specific configuration.
|
||||
# Homebrew - openssl for scrypt
|
||||
if hash brew 2>/dev/null; then
|
||||
opensslPath=$(brew --prefix openssl)
|
||||
CFLAGS+=" -I$opensslPath/include"
|
||||
LDFLAGS+=" -L$opensslPath/lib"
|
||||
fi
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
@@ -207,9 +213,9 @@ depend() {
|
||||
popd
|
||||
}
|
||||
depend_scrypt() {
|
||||
if haslib scrypt && haslib sodium; then
|
||||
CFLAGS+=" -DHAS_SCRYPT_SODIUM=1"
|
||||
LDFLAGS+=" -lscrypt -lsodium"
|
||||
if haslib sodium; then
|
||||
CFLAGS+=" -DHAS_SODIUM=1"
|
||||
LDFLAGS+=" -lsodium"
|
||||
return
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user