metznet-channel/ledger-secp256k1.patch

96 lines
3.4 KiB
Diff

diff --git a/core/lib/CMakeLists.txt b/core/lib/CMakeLists.txt
index 3e25309e4..984765bf9 100644
--- a/core/lib/CMakeLists.txt
+++ b/core/lib/CMakeLists.txt
@@ -6,7 +6,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
#list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/leveldb")
-include(ProjectSecp256k1)
add_subdirectory(bigd)
add_subdirectory(fmt)
if (SYS_OPENSSL)
diff --git a/core/src/CMakeLists.txt b/core/src/CMakeLists.txt
index 78f018827..53a877c84 100644
--- a/core/src/CMakeLists.txt
+++ b/core/src/CMakeLists.txt
@@ -143,10 +143,7 @@ target_compile_definitions(ledger-core-interface INTERFACE SPDLOG_WCHAR_FILENAME
target_link_libraries(ledger-core-interface INTERFACE spdlog)
#Secp256k1
-target_link_libraries(ledger-core-interface INTERFACE
- "${CMAKE_SOURCE_DIR}/core/lib/secp256k1/lib/${CMAKE_STATIC_LIBRARY_PREFIX}secp256k1${CMAKE_STATIC_LIBRARY_SUFFIX}")
-link_directories("${CMAKE_SOURCE_DIR}/core/lib/secp256k1/lib")
-add_dependencies(ledger-core-interface INTERFACE secp256k1)
+target_link_libraries(ledger-core-interface INTERFACE secp256k1)
target_link_libraries(ledger-core-interface INTERFACE ethash)
@@ -194,7 +191,6 @@ target_include_directories(ledger-core-interface INTERFACE ../lib/leveldb/includ
target_include_directories(ledger-core-interface INTERFACE ../lib/boost)
target_include_directories(ledger-core-interface INTERFACE ../lib/cereal/)
target_include_directories(ledger-core-interface INTERFACE ../lib/date/)
-target_include_directories(ledger-core-interface INTERFACE ../lib/secp256k1)
target_include_directories(ledger-core-interface INTERFACE ../lib/ethash/src)
target_include_directories(ledger-core-interface INTERFACE ../lib/CRCpp/inc)
diff --git a/core/src/crypto/SECP256k1Point.cpp b/core/src/crypto/SECP256k1Point.cpp
index 254b437f8..02cdedafe 100644
--- a/core/src/crypto/SECP256k1Point.cpp
+++ b/core/src/crypto/SECP256k1Point.cpp
@@ -31,7 +31,7 @@
#include "SECP256k1Point.hpp"
#include "../utils/Exception.hpp"
#include <utils/VectorUtils.h>
-#include <include/secp256k1.h>
+#include <secp256k1.h>
#include <debug/Benchmarker.h>
namespace ledger {
diff --git a/core/src/crypto/SECP256k1Point.hpp b/core/src/crypto/SECP256k1Point.hpp
index 96ecbfb8c..808c23470 100644
--- a/core/src/crypto/SECP256k1Point.hpp
+++ b/core/src/crypto/SECP256k1Point.hpp
@@ -31,7 +31,7 @@
#ifndef LEDGER_CORE_SECP256K1POINT_HPP
#define LEDGER_CORE_SECP256K1POINT_HPP
-#include <include/secp256k1.h>
+#include <secp256k1.h>
#include "../math/BigInt.h"
#include <cstdint>
diff --git a/core/src/crypto/Secp256k1Api.cpp b/core/src/crypto/Secp256k1Api.cpp
index 4fb261156..7403c93f2 100644
--- a/core/src/crypto/Secp256k1Api.cpp
+++ b/core/src/crypto/Secp256k1Api.cpp
@@ -5,7 +5,7 @@
#include "Secp256k1Api.h"
#include "utils/Exception.hpp"
#include "utils/hex.h"
-#include "include/secp256k1.h"
+#include "secp256k1.h"
namespace ledger {
namespace core {
@@ -84,4 +84,4 @@ namespace ledger {
return std::make_shared<Secp256k1Api>();
}
}
-}
\ No newline at end of file
+}
diff --git a/core/src/crypto/Secp256k1Api.h b/core/src/crypto/Secp256k1Api.h
index a8752147d..bd610f428 100644
--- a/core/src/crypto/Secp256k1Api.h
+++ b/core/src/crypto/Secp256k1Api.h
@@ -6,7 +6,7 @@
#define LEDGER_CORE_SECP256K1API_H
#include <api/Secp256k1.hpp>
-#include <include/secp256k1.h>
+#include <secp256k1.h>
namespace ledger {
namespace core {