Now uses AR from OSXCROSS for MacOS builds.

This commit is contained in:
Scott Duensing 2024-03-18 20:41:31 -05:00
parent 5daa4ff8dd
commit acd2cfb91f
2 changed files with 4 additions and 0 deletions

View file

@ -53,3 +53,5 @@ set(CMAKE_INSTALL_NAME_TOOL "${OSXCROSS_TARGET_DIR}/bin/${OSXCROSS_HOST}-install
set(ENV{PKG_CONFIG_LIBDIR} "${OSXCROSS_TARGET_DIR}/macports/pkgs/opt/local/lib/pkgconfig")
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${OSXCROSS_TARGET_DIR}/macports/pkgs")
#link_directories(${OSXCROSS_TARGET_DIR}/darwin)

View file

@ -302,7 +302,9 @@ function use_toolchain() {
CC="${OSXCROSS_LOCATION}/bin/${TRIPLE}-clang"
CXX="${OSXCROSS_LOCATION}/bin/${TRIPLE}-clang++"
RANLIB="${OSXCROSS_LOCATION}/bin/${TRIPLE}-ranlib"
AR="${OSXCROSS_LOCATION}/bin/${TRIPLE}-ar"
"${OSXCROSS_LOCATION}/bin/osxcross-conf" 2>/dev/null
echo "export AR=\"${AR}\""
echo "export OSXCROSS_LOCATION=\"${OSXCROSS_LOCATION}\""
echo "export LDFLAGS=\"-fuse-ld=${OSXCROSS_LOCATION}/bin/${TRIPLE}-ld\""
echo "export PATH=\"${OSXCROSS_LOCATION}/bin:${PATH}\""