blob: bb236b41951056d575c5fa6a29f2590222fd6cc0 [file] [log] [blame]
William A. Kennington III49e95662021-09-15 16:19:36 -07001--- a/setup.py
2+++ b/setup.py
3@@ -695,7 +695,18 @@ def determine_gl_flags():
4 c_options['use_x11'] = True
5 c_options['use_egl'] = True
6 else:
7- flags['libraries'] = ['GL']
8+ if cross_sysroot:
9+ flags['include_dirs'] = [cross_sysroot + '/usr/include']
10+ flags['library_dirs'] = [cross_sysroot + '/usr/lib']
11+
12+ if c_options['use_opengl_es2']:
13+ print("using GLESv2 libraries")
14+ flags['libraries'] = ['GLESv2']
15+ else:
16+ flags['libraries'] = ['GL']
17+
18+
19+ print("cross_sysroot: " + str(cross_sysroot))
20 return flags, base_flags
21
22
23@@ -723,14 +734,13 @@ def determine_sdl2():
24 sdl_inc = join(include, 'SDL2')
25 if isdir(sdl_inc):
26 sdl2_paths.append(sdl_inc)
27- sdl2_paths.extend(['/usr/local/include/SDL2', '/usr/include/SDL2'])
28
29 flags['include_dirs'] = sdl2_paths
30 flags['extra_link_args'] = []
31 flags['extra_compile_args'] = []
32 flags['library_dirs'] = (
33 sdl2_paths if sdl2_paths else
34- ['/usr/local/lib/'])
35+ [''])
36
37 if sdl2_flags:
38 flags = merge(flags, sdl2_flags)