diff --git a/SConstruct b/SConstruct index fa4a02c..a3d4dcc 100644 --- a/SConstruct +++ b/SConstruct @@ -45,11 +45,11 @@ if env['platform'] == "osx": cpp_library += '.osx' libgit2_lib_path += 'osx/' if env['target'] in ('debug', 'd'): - env.Append(CCFLAGS = ['-g','-O2', '-arch', 'x86_64', '-std=c++17']) - env.Append(LINKFLAGS = ['-arch', 'x86_64']) + env.Append(CCFLAGS = ['-g','-O2', '-arch', 'x86_64', '-arch', 'arm64', '-std=c++17']) + env.Append(LINKFLAGS = ['-arch', 'x86_64', '-arch', 'arm64']) else: - env.Append(CCFLAGS = ['-g','-O3', '-arch', 'x86_64', '-std=c++17']) - env.Append(LINKFLAGS = ['-arch', 'x86_64']) + env.Append(CCFLAGS = ['-g','-O3', '-arch', 'x86_64', '-arch', 'arm64', '-std=c++17']) + env.Append(LINKFLAGS = ['-arch', 'x86_64', '-arch', 'arm64']) elif env['platform'] in ('x11', 'linux'): env['target_path'] += 'x11/' diff --git a/build_libs_mac.sh b/build_libs_mac.sh index c8d538b..252676c 100755 --- a/build_libs_mac.sh +++ b/build_libs_mac.sh @@ -5,7 +5,7 @@ cd godot-git-plugin/thirdparty/libgit2/ mkdir build cd build/ rm -f CMakeCache.txt -cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF -DUSE_SSH=OFF -DUSE_HTTPS=OFF -DUSE_BUNDLED_ZLIB=ON -DUSE_ICONV=OFF +cmake .. -DCMAKE_C_FLAGS="-arch arm64 -arch x86_64" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=OFF -DUSE_SSH=OFF -DUSE_HTTPS=OFF -DUSE_BUNDLED_ZLIB=ON -DUSE_ICONV=OFF cmake --build . --config $1 cd ../../../../ mkdir -p "demo/bin/osx/"