Skip to content

Commit

Permalink
scripts: waifulib: sdl2: avoid abspath usage that causes problems whe…
Browse files Browse the repository at this point in the history
…n the path is concatenated with something else
  • Loading branch information
a1batross committed Dec 10, 2024
1 parent 415184c commit 698d631
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/waifulib/sdl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ def sdl2_configure_path(conf, path, libname):

conf.env[HAVE] = 1
if conf.env.DEST_OS == 'darwin':
conf.env[INCLUDES] = [os.path.abspath(os.path.join(path, 'Headers'))]
conf.env[INCLUDES] = [os.path.join(path, 'Headers')]
conf.env[FRAMEWORKPATH] = [my_dirname(path)]
conf.env[FRAMEWORK] = [libname]
conf.end_msg('yes: {0}, {1}, {2}'.format(conf.env[FRAMEWORK], conf.env[FRAMEWORKPATH], conf.env[INCLUDES]))
else:
conf.env[INCLUDES] = [
os.path.abspath(os.path.join(path, 'include')),
os.path.abspath(os.path.join(path, 'include/%s' % libname))
os.path.join(path, 'include'),
os.path.join(path, 'include/%s' % libname)
]
libpath = 'lib'
if conf.env.COMPILER_CC == 'msvc':
if conf.env.DEST_CPU == 'x86_64':
libpath = 'lib/x64'
else:
libpath = 'lib/' + conf.env.DEST_CPU
conf.env[LIBPATH] = [os.path.abspath(os.path.join(path, libpath))]
conf.env[LIBPATH] = [os.path.join(path, libpath)]
conf.env[LIB] = [libname]
conf.end_msg('yes: {0}, {1}, {2}'.format(conf.env[LIB], conf.env[LIBPATH], conf.env[INCLUDES]))

Expand Down

0 comments on commit 698d631

Please sign in to comment.