Skip to content

Commit

Permalink
argon2: use as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Désaulniers authored and sim590 committed Mar 22, 2017
1 parent 358d8bd commit 19c3628
Show file tree
Hide file tree
Showing 28 changed files with 70 additions and 3,837 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
@@ -0,0 +1,4 @@
[submodule "argon2"]
path = argon2
url = https://github.com/P-H-C/phc-winner-argon2
ignore = dirty
29 changes: 17 additions & 12 deletions CMakeLists.txt
Expand Up @@ -74,17 +74,6 @@ list (APPEND opendht_SOURCES
src/log.cpp
)

if (OPENDHT_ARGON2)
list (APPEND opendht_SOURCES
argon2/argon2.c
argon2/core.c
argon2/blake2/blake2b.c
argon2/thread.c
argon2/encoding.c
argon2/ref.c
)
endif ()

list (APPEND opendht_HEADERS
include/opendht/def.h
include/opendht/utils.h
Expand Down Expand Up @@ -116,12 +105,28 @@ configure_file (
@ONLY
)

include_directories (
include_directories(
./
include/
include/opendht/
${CMAKE_CURRENT_BINARY_DIR}/include/
)
if(OPENDHT_ARGON2)
# make sure argon2 submodule is up to date and initialized
message("Initializing Argon2 submodule")
execute_process(COMMAND git submodule update --init)

# add local argon2 files to build
list (APPEND opendht_SOURCES
argon2/src/argon2.c
argon2/src/core.c
argon2/src/blake2/blake2b.c
argon2/src/thread.c
argon2/src/ref.c
argon2/src/encoding.c
)
include_directories(argon2/include/)
endif()

if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
Expand Down
4 changes: 0 additions & 4 deletions Makefile.am
Expand Up @@ -2,10 +2,6 @@ AM_CXXFLAGS = -pthread

SUBDIRS =

if WITH_INCLUDED_ARGON2
SUBDIRS += argon2
endif

SUBDIRS += src

if ENABLE_TOOLS
Expand Down
1 change: 1 addition & 0 deletions argon2
Submodule argon2 added at 6f5427
31 changes: 0 additions & 31 deletions argon2/LICENSE

This file was deleted.

23 changes: 0 additions & 23 deletions argon2/Makefile.am

This file was deleted.

0 comments on commit 19c3628

Please sign in to comment.