From 9a8173994552f7060e4a347b799b4ac7255e5d9f Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 15 May 2024 17:28:12 +0200 Subject: fix amd64 builds on macos fix homebrew_prefix --- monero_libwallet2_api_c/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'monero_libwallet2_api_c') diff --git a/monero_libwallet2_api_c/CMakeLists.txt b/monero_libwallet2_api_c/CMakeLists.txt index 17202f6..59343fb 100644 --- a/monero_libwallet2_api_c/CMakeLists.txt +++ b/monero_libwallet2_api_c/CMakeLists.txt @@ -294,6 +294,13 @@ else() set(EXTRA_LIBS "") endif() +if (${HOST_ABI} STREQUAL "host-apple-darwin") + EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE ) + if (NOT ${ARCHITECTURE} STREQUAL arm64) + set(EXTRA_LIBS "wallet-crypto") + endif() +endif() + if (${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11") set(EXTRA_LIBS_APPLE "-framework IOKit" "-framework CoreFoundation" "-framework Cocoa" hidapi) # set_target_properties(wallet2_api_c PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks") -- cgit v1.2.3