Guard mac compilation for Mac OS X only.

This commit is contained in:
2021-10-13 14:32:45 +01:00
parent a7a822432e
commit 0ac6d8dd24

View File

@@ -16,6 +16,8 @@
# 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/>.
OS_NAME=`uname`
## Android (ARM)
# Detected system processor: armv7-a
rm -f CMakeCache.txt
@@ -190,7 +192,8 @@ docker/dockcross-win-x86 cmake -DCMAKE_BUILD_TYPE=Release
docker/dockcross-win-x86 make
mv libAaru.Checksums.Native.dll runtimes/win-x86/native/
## Mac OS X (arm64 and x64
## Mac OS X (arm64 and x64)
if [[ ${OS_NAME} == Darwin ]]; then
rm -f CMakeCache.txt
cmake -DCMAKE_BUILD_TYPE=Release .
make
@@ -198,10 +201,9 @@ mkdir -p runtimes/osx-arm64/native
mkdir -p runtimes/osx-x64/native
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-x86"
# TODO: "osx-arm64"
# TODO: "osx-x64"
nuget pack