Skip to content

Commit

Permalink
Updated adjustments on build script for GLFW adaptation on multiplatf…
Browse files Browse the repository at this point in the history
…orm.
  • Loading branch information
nthnn committed Dec 14, 2024
1 parent 7569a8b commit 302a091
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def include_sha_headers():
'sudo', 'apt', 'install',
'-y', 'libglfw3-dev', 'libgl1-mesa-dev'
])
elif PLATFORM == 'Darwin':
subprocess.run([
'brew', 'install', 'glfw'
])

print('Building binaries...')
if PLATFORM == 'Windows':
Expand Down Expand Up @@ -310,7 +314,9 @@ def include_sha_headers():
lib_build_args = [
'g++', '-Iinclude', '-Istd', '-fPIC',
'-shared', '-o', OUTPUT_LIBRARY + '.so'
] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files
] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files + [
'-lglfw', '-lGL'
]

print("Executing:")
print(' '.join(exe_build_args))
Expand Down Expand Up @@ -347,7 +353,9 @@ def include_sha_headers():
lib_build_args = [
'/opt/homebrew/opt/llvm/bin/clang++', '-Iinclude',
'-Istd', '-shared', '-o', OUTPUT_LIBRARY + '.dylib'
] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files
] + ext_instructions + lib_headers + lib_source_files + cpp_files + cc_files + [
'-lglfw', '-framework', 'OpenGL'
]

print("Executing:")
print(' '.join(exe_build_args))
Expand Down

0 comments on commit 302a091

Please sign in to comment.