Fix incorrect directory splitting on win to use semi-colon.

This commit is contained in:
Matthew Einhorn 2015-03-18 15:30:32 -04:00
parent 9f3760e521
commit 88e3e689ca
1 changed files with 9 additions and 4 deletions

View File

@ -534,13 +534,18 @@ def determine_sdl2():
# no pkgconfig info, or we want to use a specific sdl2 path, so perform # no pkgconfig info, or we want to use a specific sdl2 path, so perform
# manual configuration # manual configuration
flags['libraries'] = ['SDL2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer'] flags['libraries'] = ['SDL2', 'SDL2_ttf', 'SDL2_image', 'SDL2_mixer']
flags['include_dirs'] = (sdl2_path.split(':') if sdl2_path else split_chr = ';' if platform == 'win32' else ':'
['/usr/local/include/SDL2', '/usr/include/SDL2']) sdl2_paths = sdl2_path.split(split_chr) if sdl2_path else []
flags['include_dirs'] = (
sdl2_paths if sdl2_paths else
['/usr/local/include/SDL2', '/usr/include/SDL2'])
flags['extra_link_args'] = [] flags['extra_link_args'] = []
flags['extra_compile_args'] = [] flags['extra_compile_args'] = []
flags['extra_link_args'] += (['-L' + sdl2_path] if sdl2_path else flags['extra_link_args'] += (
['-L/usr/local/lib/']) ['-L' + p for p in sdl2_paths] if sdl2_paths else
['-L/usr/local/lib/'])
# ensure headers for all the SDL2 and sub libraries are available # ensure headers for all the SDL2 and sub libraries are available
libs_to_check = ['SDL', 'SDL_mixer', 'SDL_ttf', 'SDL_image'] libs_to_check = ['SDL', 'SDL_mixer', 'SDL_ttf', 'SDL_image']