summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-05-15 17:28:12 +0200
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-05-15 17:28:35 +0200
commit9a8173994552f7060e4a347b799b4ac7255e5d9f (patch)
tree3b64aff525d87b08e6918be94db5fc33b14eece3
parent060c27f91e23d7123e0eae535756212b81574ae6 (diff)
fix amd64 builds on macos
fix homebrew_prefix
-rwxr-xr-xbuild_single.sh9
-rw-r--r--monero_libwallet2_api_c/CMakeLists.txt7
2 files changed, 13 insertions, 3 deletions
diff --git a/build_single.sh b/build_single.sh
index b9da372..4130f8a 100755
--- a/build_single.sh
+++ b/build_single.sh
@@ -148,10 +148,13 @@ pushd $repo/contrib/depends
MACOS_LIBS_DIR="${PWD}/host-apple-darwin"
rm -rf ${MACOS_LIBS_DIR}
mkdir -p ${MACOS_LIBS_DIR}/lib
- export HOMEBREW_PREFIX=/opt/homebrew
- if [[ ! -d "$HOMEBREW_PREFIX" ]];
+ if [[ "x$HOMEBREW_PREFIX" == "x" ]];
then
- export HOMEBREW_PREFIX=/usr/local
+ export HOMEBREW_PREFIX=/opt/homebrew
+ if [[ ! -d "$HOMEBREW_PREFIX" ]];
+ then
+ export HOMEBREW_PREFIX=/usr/local
+ fi
fi
verbose_copy "${HOMEBREW_PREFIX}/lib/libunbound.a" ${MACOS_LIBS_DIR}/lib/libunbound.a
verbose_copy "${HOMEBREW_PREFIX}/lib/libboost_chrono-mt.a" ${MACOS_LIBS_DIR}/lib/libboost_chrono-mt.a
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")