forked from hyperledger-iroha/iroha-dco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate ed25519 library; update Dockerfile
Signed-off-by: Andrei Lebedev <[email protected]>
- Loading branch information
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
add_library(ed25519 UNKNOWN IMPORTED) | ||
|
||
find_path(ed25519_INCLUDE_DIR ed25519/ed25519.h) | ||
mark_as_advanced(ed25519_INCLUDE_DIR) | ||
|
||
find_library(ed25519_LIBRARY ed25519) | ||
mark_as_advanced(ed25519_LIBRARY) | ||
|
||
find_package_handle_standard_args(ed25519 DEFAULT_MSG | ||
ed25519_INCLUDE_DIR | ||
ed25519_LIBRARY | ||
) | ||
|
||
set(URL https://github.com/warchant/ed25519.git) | ||
set(VERSION 0d31b082e0f0d4144fe598fb0f2a120e36de2a8f) | ||
set_target_description(ed25519 "Digital signature algorithm" ${URL} ${VERSION}) | ||
|
||
if (NOT ed25519_FOUND) | ||
externalproject_add(warchant_ed25519 | ||
GIT_REPOSITORY ${URL} | ||
GIT_TAG ${VERSION} | ||
CMAKE_ARGS | ||
-DTESTING=OFF | ||
INSTALL_COMMAND "" # remove install step | ||
TEST_COMMAND "" # remove test step | ||
UPDATE_COMMAND "" # remove update step | ||
) | ||
externalproject_get_property(warchant_ed25519 binary_dir) | ||
externalproject_get_property(warchant_ed25519 source_dir) | ||
set(ed25519_INCLUDE_DIR ${source_dir}/include) | ||
set(ed25519_LIBRARY ${binary_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}ed25519${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
message(STATUS ${ed25519_LIBRARY}) | ||
file(MAKE_DIRECTORY ${ed25519_INCLUDE_DIR}) | ||
|
||
add_dependencies(ed25519 warchant_ed25519) | ||
endif () | ||
|
||
set_target_properties(ed25519 PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES ${ed25519_INCLUDE_DIR} | ||
IMPORTED_LOCATION ${ed25519_LIBRARY} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters