Skip to content

Commit 73b918a

Browse files
committed
Merge branch 'bthomee/ed25519' into bthomee/secp256k1
2 parents 1e99ce1 + 9e0bd5b commit 73b918a

File tree

4 files changed

+53
-65
lines changed

4 files changed

+53
-65
lines changed

recipes/ed25519/all/CMakeLists.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
project(ed25519
4+
LANGUAGES C
5+
)
6+
7+
if(PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME)
8+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/output/$<CONFIG>/lib")
9+
endif()
10+
11+
if(NOT TARGET OpenSSL::SSL)
12+
find_package(OpenSSL)
13+
endif()
14+
15+
add_library(ed25519 STATIC
16+
ed25519.c
17+
)
18+
add_library(ed25519::ed25519 ALIAS ed25519)
19+
target_link_libraries(ed25519 PUBLIC OpenSSL::SSL)
20+
if(NOT MSVC)
21+
target_compile_options(ed25519 PRIVATE -Wno-implicit-fallthrough)
22+
endif()
23+
24+
include(GNUInstallDirs)
25+
26+
#[=========================================================[
27+
NOTE for macos:
28+
https://github.com/floodyberry/ed25519-donna/issues/29
29+
our source for ed25519-donna-portable.h has been
30+
patched to workaround this.
31+
#]=========================================================]
32+
target_include_directories(ed25519 PUBLIC
33+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
34+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
35+
)
36+
37+
install(
38+
TARGETS ed25519
39+
EXPORT ${PROJECT_NAME}-exports
40+
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
41+
)
42+
install(
43+
EXPORT ${PROJECT_NAME}-exports
44+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
45+
FILE ${PROJECT_NAME}-targets.cmake
46+
NAMESPACE ${PROJECT_NAME}::
47+
)
48+
install(
49+
FILES ed25519.h
50+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
51+
)

recipes/ed25519/all/conandata.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ sources:
44
commit: 8757bd4cd209cb032853ece0ce413f122eef212c
55
patches:
66
"2015.03":
7-
- patch_file: "patches/2015.03-cmake.patch"
8-
patch_type: conan
97
- patch_file: "patches/2015.03-define.patch"
108
patch_type: conan

recipes/ed25519/all/conanfile.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from conan import ConanFile, tools
22
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
3-
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get
3+
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get
44
from conan.tools.scm import Git
55

66
required_conan_version = ">=2.0.0"
@@ -15,6 +15,7 @@ class EdDonnaConan(ConanFile):
1515
default_options = {"shared": False, "fPIC": True}
1616

1717
def export_sources(self):
18+
copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder+"/src")
1819
export_conandata_patches(self)
1920

2021
def config_options(self):
@@ -32,8 +33,6 @@ def source(self):
3233
def generate(self):
3334
tc = CMakeToolchain(self)
3435
tc.generate()
35-
deps = CMakeDeps(self)
36-
deps.generate()
3736

3837
def build(self):
3938
cmake = CMake(self)
@@ -50,6 +49,3 @@ def package_info(self):
5049
self.cpp_info.libs = ["ed25519"]
5150
self.cpp_info.names["cmake_find_package"] = "ed25519"
5251
self.cpp_info.names["cmake_find_package_multi"] = "ed25519"
53-
54-
def package_id(self):
55-
self.info.clear()

recipes/ed25519/all/patches/2015.03-cmake.patch

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)