From 04d02626863144a69caf5c821502c91093b7de58 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 27 Mar 2024 15:46:01 +0100 Subject: fix wownero coin control use proper headers properly apply patches --- libbridge/CMakeLists.txt | 5 +++++ libbridge/src/main/cpp/wallet2_api.h | 1 - libbridge/src/main/cpp/wallet2_api_c.cpp | 10 +++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) delete mode 120000 libbridge/src/main/cpp/wallet2_api.h (limited to 'libbridge') diff --git a/libbridge/CMakeLists.txt b/libbridge/CMakeLists.txt index d2f3cfa..620577f 100644 --- a/libbridge/CMakeLists.txt +++ b/libbridge/CMakeLists.txt @@ -277,6 +277,11 @@ if(${HOST_ABI} STREQUAL "x86_64-w64-mingw32" OR ${HOST_ABI} STREQUAL "i686-w64-m set(EXTRA_LIBS_WINDOWS wsock32 ws2_32 iconv iphlpapi crypt32 hidapi) endif() +if (${MONERO_FLAVOR} STREQUAL "monero") + target_compile_definitions(wallet2_api_c PRIVATE FLAVOR_MONERO) +elseif(${MONERO_FLAVOR} STREQUAL "wownero") + target_compile_definitions(wallet2_api_c PRIVATE FLAVOR_WOWNERO) +endif() target_link_libraries( wallet2_api_c diff --git a/libbridge/src/main/cpp/wallet2_api.h b/libbridge/src/main/cpp/wallet2_api.h deleted file mode 120000 index 6d9c48d..0000000 --- a/libbridge/src/main/cpp/wallet2_api.h +++ /dev/null @@ -1 +0,0 @@ -../../../../monero/src/wallet/api/wallet2_api.h \ No newline at end of file diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp index d5da3e1..9208765 100644 --- a/libbridge/src/main/cpp/wallet2_api_c.cpp +++ b/libbridge/src/main/cpp/wallet2_api_c.cpp @@ -1,11 +1,19 @@ #include #include "wallet2_api_c.h" -#include "wallet2_api.h" #include #include "helpers.hpp" #include #include +#ifdef FLAVOR_MONERO +#include "../../../../monero/src/wallet/api/wallet2_api.h" +#endif + +#ifdef FLAVOR_WOWNERO +#include "../../../../wownero/src/wallet/api/wallet2_api.h" +#endif + + #ifdef __cplusplus extern "C" { -- cgit v1.2.3