Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/pip-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,10 @@ jobs:
- name: Generate and build MRBind bindings
env:
PATH: ${{matrix.brewpath}}/opt/make/libexec/gnubin:${{matrix.brewpath}}/opt/grep/libexec/gnubin:${{env.PATH}}
# `MACOS_MIN_VER` picked arbitrarily to match what Apple Clang uses when building MeshLib.
# Not setting this or setting a different value cases a warning when linking the bindings, and you can get the correct (?) value from those warnings.
# Match the 12.0 floor in DefaultOptions.cmake (mrbind doesn't go through CMake).
run: |
make --version
make -f scripts/mrbind/generate.mk -B --trace FOR_WHEEL=1 MACOS_MIN_VER=12.7
make -f scripts/mrbind/generate.mk -B --trace FOR_WHEEL=1 MACOS_MIN_VER=12.0

- name: Unit Tests
run: build/Release/bin/MRTest
Expand Down
4 changes: 4 additions & 0 deletions cmake/Modules/DefaultOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ IF(MR_EMSCRIPTEN AND MR_EMSCRIPTEN_WASM64)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s MEMORY64=1")
ENDIF()

IF(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum macOS version")
ENDIF()

add_compile_definitions(MR_USE_CMAKE_CONFIGURE_FILE)

# MSVC debug information format
Expand Down
29 changes: 29 additions & 0 deletions scripts/install_brew_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,39 @@ if [ -n "$MESHLIB_EXTRA_BREW_REQUIREMENTS" ] ; then
MESHLIB_BREW_REQUIREMENTS=$MESHLIB_BREW_REQUIREMENTS$'\n'$MESHLIB_EXTRA_BREW_REQUIREMENTS
fi

# Pin the libs that link into the pip wheel to monterey-tagged bottles so they
# match CMAKE_OSX_DEPLOYMENT_TARGET=12.0 (default Sequoia bottles target 14).
# brew install doesn't accept --bottle-tag, so we fetch the cross-tag bottle
# into brew's cache and install from there.
PINNED_FORMULAS="jsoncpp openvdb opencascade tbb"
if [ "$(uname -m)" = "arm64" ]; then
BOTTLE_TAG="arm64_monterey"
else
BOTTLE_TAG="monterey"
fi
export MACOSX_DEPLOYMENT_TARGET=12.0
# Fail fast if either the fetch or the install breaks; without `set -e`
# previous iterations silently fell through to default Sequoia bottles.
set -e
brew fetch --bottle-tag="$BOTTLE_TAG" $PINNED_FORMULAS
for f in $PINNED_FORMULAS; do
CACHED=$(brew --cache --bottle-tag="$BOTTLE_TAG" "$f")
echo "Installing cross-tag bottle: $CACHED"
ls -la "$CACHED"
brew install --quiet "$CACHED"
done
set +e

brew install --quiet $(echo "$MESHLIB_BREW_REQUIREMENTS" | tr '\n' ' ')

brew install --quiet pybind11

# Strip dylibs we'll bundle (brew keeps full symbol tables for symbolication).
# Walk Cellar/ directly because $BREW_PREFIX/lib contains only symlinks into it.
BREW_PREFIX=$(brew --prefix)
find "$BREW_PREFIX/Cellar" -type f -name '*.dylib' \
-exec chmod u+w {} + -exec strip -x {} + 2>/dev/null || true

# check and upgrade python3 pip
python3.10 -m ensurepip --upgrade
python3.10 -m pip install --upgrade pip
Expand Down
3 changes: 3 additions & 0 deletions thirdparty/vcpkg/triplets/arm64-linux-meshlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_FIXUP_ELF_RPATH ON)

# Strip .symtab/.strtab/.debug_* on release link (~15 MB across the dep chain).
set(VCPKG_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS_RELEASE} -Wl,-s")
3 changes: 3 additions & 0 deletions thirdparty/vcpkg/triplets/x64-linux-meshlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_FIXUP_ELF_RPATH ON)

# Strip .symtab/.strtab/.debug_* on release link (~15 MB across the dep chain).
set(VCPKG_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS_RELEASE} -Wl,-s")
Loading