Browse Source

waflib: try to fix sdl2 searching on osx again

pull/2/head
Alibek Omarov 6 years ago
parent
commit
aac44ef866
  1. 8
      scripts/waflib/sdl2.py

8
scripts/waflib/sdl2.py

@ -22,13 +22,19 @@ def options(opt): @@ -22,13 +22,19 @@ def options(opt):
'--skip-sdl2-sanity-check', action='store_false', default = True, dest='SDL2_SANITY_CHECK',
help = 'Skip checking SDL2 sanity')
def my_dirname(path):
# really dumb, will not work with /path/framework//, but still enough
if path[-1] == '/':
path = path[:-1]
return os.path.dirname(path)
def sdl2_configure_path(conf, path):
conf.env.HAVE_SDL2 = 1
if conf.env.DEST_OS == 'darwin':
conf.env.INCLUDES_SDL2 = [
os.path.abspath(os.path.join(path, 'Headers'))
]
conf.env.FRAMEWORKPATH_SDL2 = [os.path.dirname(path)]
conf.env.FRAMEWORKPATH_SDL2 = [my_dirname(path)]
conf.env.FRAMEWORK_SDL2 = ['SDL2']
else:
conf.env.INCLUDES_SDL2 = [

Loading…
Cancel
Save