mirror of
https://github.com/aaru-dps/Aaru.Checksums.Native.git
synced 2025-12-16 11:14:29 +00:00
Guard mac compilation for Mac OS X only.
This commit is contained in:
22
build.sh
22
build.sh
@@ -16,6 +16,8 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
OS_NAME=`uname`
|
||||||
|
|
||||||
## Android (ARM)
|
## Android (ARM)
|
||||||
# Detected system processor: armv7-a
|
# Detected system processor: armv7-a
|
||||||
rm -f CMakeCache.txt
|
rm -f CMakeCache.txt
|
||||||
@@ -190,18 +192,18 @@ docker/dockcross-win-x86 cmake -DCMAKE_BUILD_TYPE=Release
|
|||||||
docker/dockcross-win-x86 make
|
docker/dockcross-win-x86 make
|
||||||
mv libAaru.Checksums.Native.dll runtimes/win-x86/native/
|
mv libAaru.Checksums.Native.dll runtimes/win-x86/native/
|
||||||
|
|
||||||
## Mac OS X (arm64 and x64
|
## Mac OS X (arm64 and x64)
|
||||||
rm -f CMakeCache.txt
|
if [[ ${OS_NAME} == Darwin ]]; then
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
rm -f CMakeCache.txt
|
||||||
make
|
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||||
mkdir -p runtimes/osx-arm64/native
|
make
|
||||||
mkdir -p runtimes/osx-x64/native
|
mkdir -p runtimes/osx-arm64/native
|
||||||
lipo libAaru.Checksums.Native.dylib -thin arm64 -output runtimes/osx-arm64/native/libAaru.Checksums.Native.dylib
|
mkdir -p runtimes/osx-x64/native
|
||||||
lipo libAaru.Checksums.Native.dylib -thin x86_64 -output runtimes/osx-x64/native/libAaru.Checksums.Native.dylib
|
lipo libAaru.Checksums.Native.dylib -thin arm64 -output runtimes/osx-arm64/native/libAaru.Checksums.Native.dylib
|
||||||
|
lipo libAaru.Checksums.Native.dylib -thin x86_64 -output runtimes/osx-x64/native/libAaru.Checksums.Native.dylib
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: "linux-musl-x64"
|
# TODO: "linux-musl-x64"
|
||||||
# TODO: "linux-musl-x86"
|
# TODO: "linux-musl-x86"
|
||||||
# TODO: "osx-arm64"
|
|
||||||
# TODO: "osx-x64"
|
|
||||||
|
|
||||||
nuget pack
|
nuget pack
|
||||||
Reference in New Issue
Block a user