Skip to content

Commit

Permalink
Patching conan toolchain for universal2
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Feb 28, 2024
1 parent 95b9a81 commit 4c072d9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/get_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,21 @@ def install_deps(arch: str):
return conan_output


def patch_conan_toolchain_universal2(lipo_dir_merge_src: str):
conan_toolchain_path = os.path.join(lipo_dir_merge_src, "conan_toolchain.cmake")

result = ""
with open(conan_toolchain_path) as f:
for line in f:
if line.startswith("set(CMAKE_OSX_ARCHITECTURES"):
result += "# " + line
else:
result += line

with open(conan_toolchain_path, "w_") as f:
f.write(result)


def main():
arch = get_arch()

Expand Down Expand Up @@ -140,6 +155,8 @@ def main():
shutil.rmtree(lipo_dir_merge_src)
shutil.move(lipo_dir_merge_result, lipo_dir_merge_src)

patch_conan_toolchain_universal2(lipo_dir_merge_src)


if __name__ == "__main__":
main()

0 comments on commit 4c072d9

Please sign in to comment.