Skip to content

Commit fd9076f

Browse files
authored
Support building and using externally built manifold on macOS (openscad#5310)
1 parent fd3f465 commit fd9076f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

scripts/macosx-build-dependencies.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ PACKAGES=(
6161
"opencsg 1.6.0"
6262
"qscintilla 2.14.1"
6363
"onetbb 2021.12.0"
64+
"manifold 3.0.0"
6465
)
6566
DEPLOY_PACKAGES=(
6667
"sparkle 1.27.1"
@@ -859,6 +860,24 @@ build_cairo()
859860
install_name_tool -change @rpath/libpixman.dylib @rpath/libpixman-1.dylib $DEPLOYDIR/lib/libcairo.dylib
860861
}
861862

863+
build_manifold()
864+
{
865+
cd $BASEDIR/src
866+
rm -rf "manifold-$version"
867+
if [ ! -f "manifold-$version.tar.gz" ]; then
868+
curl -LO https://github.com/elalish/manifold/releases/download/v$version/manifold-$version.tar.gz
869+
fi
870+
tar xzf "manifold-$version.tar.gz"
871+
cd "manifold-$version"
872+
873+
mkdir build
874+
cd build
875+
cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="$ARCHS_COMBINED" -DMANIFOLD_CBIND=OFF -DMANIFOLD_TEST=OFF -DMANIFOLD_PAR=ON ..
876+
make -j$NUMCPU
877+
make install
878+
}
879+
880+
862881
if [ ! -f $OPENSCADDIR/openscad.appdata.xml.in ]; then
863882
echo "Must be run from the OpenSCAD source root directory"
864883
exit 0

0 commit comments

Comments
 (0)