Skip to content

Commit

Permalink
Apparently glfw on OS X incorrectly puts the frameworks into Libs.pri…
Browse files Browse the repository at this point in the history
…vate
  • Loading branch information
kovidgoyal committed Jan 10, 2017
1 parent 8e565d5 commit 192ce1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,17 @@ def init_env(debug=False, asan=False):
fd = sysconfig.get_config_var('LIBDEST')
fd = fd[:fd.index('/Python.framework')]
pylib = ['-F' + fd, '-framework', 'Python']
glfw_ldflags = pkg_config('--libs', '--static', 'glfw3')
else:
lib = sysconfig.get_config_var('LDLIBRARY')
if lib.startswith('lib'):
lib = lib[3:]
if lib.endswith('.so'):
lib = lib[:-3]
pylib = ['-L' + sysconfig.get_config_var('LIBDIR'), '-l' + lib]
glfw_ldflags = pkg_config('glfw3', '--libs')
ldpaths = pylib + \
pkg_config('glew', '--libs') + pkg_config('freetype2', '--libs') + pkg_config('glfw3', '--libs')
pkg_config('glew', '--libs') + pkg_config('freetype2', '--libs') + glfw_ldflags

try:
os.mkdir(build_dir)
Expand Down

0 comments on commit 192ce1d

Please sign in to comment.