mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
Build antlr as external project inside of lib/antlr. Cache in Ci the antlr folder to speed up compilation times. * replace ERROR with ANTLR_ERROR, fix clang build * added missing define needed to link on windows * different lib name with clang on windows
27 lines
782 B
Bash
Executable file
27 lines
782 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Clean left overs from previous builds if there are any
|
|
rm -f -R antlr4-runtime build lib 2> /dev/null
|
|
rm antlr4-cpp-runtime-macos.zip 2> /dev/null
|
|
|
|
# Binaries
|
|
xcodebuild -project runtime/antlrcpp.xcodeproj -target antlr4 -configuration Release
|
|
xcodebuild -project runtime/antlrcpp.xcodeproj -target antlr4_static -configuration Release
|
|
rm -f -R lib
|
|
mkdir lib
|
|
mv runtime/build/Release/libantlr4-runtime.a lib/
|
|
mv runtime/build/Release/libantlr4-runtime.dylib lib/
|
|
|
|
# Headers
|
|
rm -f -R antlr4-runtime
|
|
pushd runtime/src
|
|
find . -name '*.h' | cpio -pdm ../../antlr4-runtime
|
|
popd
|
|
|
|
# Zip up and clean up
|
|
zip -r antlr4-cpp-runtime-macos.zip antlr4-runtime lib
|
|
|
|
rm -f -R antlr4-runtime build lib
|
|
|
|
# Deploy
|
|
#cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download
|