diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ed7786..9395fdb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: run: | git submodule update --init --recursive brew install scons - scons platform=osx target=release bits=64 godot_cpp=yes generate_bindings=yes use_custom_api_file=yes custom_api_file=api.ci.json macos_arch=universal use_llvm=yes -j $(sysctl -n hw.logicalcpu) + scons platform=osx target=release bits=64 godot_cpp=yes generate_bindings=yes use_custom_api_file=yes custom_api_file=api.ci.json macos_arch=universal macos_deployment_target=10.13 use_llvm=yes -j $(sysctl -n hw.logicalcpu) otool -L demo/addons/godot-git-plugin/osx/libgitapi.dylib - uses: actions/upload-artifact@v2 with: diff --git a/SConstruct b/SConstruct index e660b81..92a2dde 100644 --- a/SConstruct +++ b/SConstruct @@ -33,6 +33,7 @@ opts.Add(PathVariable("macos_openssl_static_ssl", "Path to OpenSSL libssl.a libr os.path.join(os.path.abspath(os.getcwd()), "thirdparty/openssl/libssl.a"), PathVariable.PathAccept)) opts.Add(PathVariable("macos_openssl_static_crypto", "Path to OpenSSL libcrypto.a library - only used in macOS builds.", os.path.join(os.path.abspath(os.getcwd()), "thirdparty/openssl/libcrypto.a"), PathVariable.PathAccept)) +opts.Add("macos_deployment_target", "macOS deployment target", "default") # Updates the environment with the option variables. opts.Update(env) @@ -49,6 +50,12 @@ if env["platform"] == "osx": env.Append(LINKFLAGS=["-arch", env["macos_arch"]]) env.Append(CCFLAGS=["-arch", env["macos_arch"]]) + if env["macos_deployment_target"] != "default": + env.Append(CCFLAGS=["-mmacosx-version-min=" + + env["macos_deployment_target"]]) + env.Append(LINKFLAGS=["-mmacosx-version-min=" + + env["macos_deployment_target"]]) + Export("env") SConscript("thirdparty/SCsub") diff --git a/build_openssl_universal_osx.sh b/build_openssl_universal_osx.sh index b335b1a..e8bb1ca 100644 --- a/build_openssl_universal_osx.sh +++ b/build_openssl_universal_osx.sh @@ -12,9 +12,9 @@ cd openssl_arm64 make cd ../ cd openssl_x86_64 -./Configure darwin64-x86_64-cc +./Configure darwin64-x86_64-cc -mmacosx-version-min=10.13 make cd ../ -lipo -create openssl_arm64/libcrypto.a openssl_x86_64/libcrypto.a -output libcrypto.a -lipo -create openssl_arm64/libssl.a openssl_x86_64/libssl.a -output libssl.a +lipo -create openssl_arm64/libcrypto.a openssl_x86_64/libcrypto.a -output thirdparty/openssl/libcrypto.a +lipo -create openssl_arm64/libssl.a openssl_x86_64/libssl.a -output thirdparty/openssl/libssl.a rm openssl-$OPENSSL_VERSION.tar.gz diff --git a/thirdparty/openssl/libcrypto.a b/thirdparty/openssl/libcrypto.a index bb98f3d..b68d002 100644 Binary files a/thirdparty/openssl/libcrypto.a and b/thirdparty/openssl/libcrypto.a differ diff --git a/thirdparty/openssl/libssl.a b/thirdparty/openssl/libssl.a index fb2c40c..1d269e9 100644 Binary files a/thirdparty/openssl/libssl.a and b/thirdparty/openssl/libssl.a differ