Skip to content

Commit

Permalink
Merge pull request #4 from Nicky-D/master
Browse files Browse the repository at this point in the history
Enable Linux builds
  • Loading branch information
nat-goodspeed authored Jan 2, 2024
2 parents 45d4497 + 815e655 commit 4f905dd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
strategy:
matrix:
os: [windows-2022, macos-11] #, ubuntu-22.04]
os: [windows-2022, macos-11, ubuntu-22.04]
addrsize: ["64"]
include:
- os: windows-2022
Expand Down
4 changes: 2 additions & 2 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<key>linux64</key>
<map>
<key>configurations</key>
<map>
Expand All @@ -91,7 +91,7 @@
<string>lib/release/*.a</string>
</array>
<key>name</key>
<string>linux</string>
<string>linux64</string>
</map>
<key>windows</key>
<map>
Expand Down
26 changes: 18 additions & 8 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,32 @@ pushd "$MESHOPT_SOURCE_DIR"
export CPPFLAGS="$TARGET_CPPFLAGS"
fi

rm -rf build && mkdir build && pushd build

cmake .. -DCMAKE_INSTALL_PREFIX:STRING="${stage}" \

make -j $AUTOBUILD_CPU_COUNT
make install
rm -rf build && mkdir build
pushd build
cmake .. -DCMAKE_INSTALL_PREFIX:STRING="${stage}"

make -j $AUTOBUILD_CPU_COUNT
make install
popd

mkdir -p "$stage/lib/release"
mv "$stage/lib/meshoptimizer.a" \
"$stage/lib/release/meshoptimizer.a"
mv "$stage/lib/libmeshoptimizer.a" \
"$stage/lib/release/libmeshoptimizer.a"

mkdir -p "$stage/include/meshoptimizer"
mv "$stage/include/meshoptimizer.h" \
"$stage/include/meshoptimizer/meshoptimizer.h"

rm -r "$stage/lib/cmake"

# populate version_file - prefer this method of regex extraction
# with a multitude of different tools - that can and does break over time.
gcc -DVERSION_HEADER_FILE="\"$VERSION_HEADER_FILE\"" \
-DVERSION_MACRO="$VERSION_MACRO" \
-o "$stage/version" "$top/version.c"
"$stage/version" > "$stage/VERSION.txt"
rm "$stage/version"

;;
esac
mkdir -p "$stage/LICENSES"
Expand Down

0 comments on commit 4f905dd

Please sign in to comment.