cmake: Fix #4038 MacOS target older OS and SDK versions

This fix ensures that when `MACOSX_DEPLOYMENT_TARGET` and `SDKROOT` are set, they are respected when building the libraries and executables.
This commit is contained in:
Lukas Oberhuber 2024-11-08 00:08:33 +00:00
parent 51eb7daf39
commit d0fe334c85

View File

@ -200,9 +200,9 @@ travis-install:
.PHONY: clangbuild-darwin-fat .PHONY: clangbuild-darwin-fat
clangbuild-darwin-fat: clean clangbuild-darwin-fat: clean
clang -v clang -v
CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch arm64" $(MAKE) zstd-release CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch arm64" $(MAKE) zstd-release
mv programs/zstd programs/zstd_arm64 mv programs/zstd programs/zstd_arm64
CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch x86_64" $(MAKE) zstd-release CXX=clang++ CC=clang CFLAGS+="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation -arch x86_64" $(MAKE) zstd-release
mv programs/zstd programs/zstd_x64 mv programs/zstd programs/zstd_x64
lipo -create programs/zstd_x64 programs/zstd_arm64 -output programs/zstd lipo -create programs/zstd_x64 programs/zstd_arm64 -output programs/zstd