diff options
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r-- | platform/x11/detect.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index bd5e5e0812..b5b7895da9 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -179,18 +179,10 @@ def configure(env): env.Append(CCFLAGS=['-pipe']) env.Append(LINKFLAGS=['-pipe']) - # Check for gcc version >= 6 before adding -no-pie - if using_gcc(env): - version = get_compiler_version(env) - if version != None and version[0] >= '6': - env.Append(CCFLAGS=['-fpie']) - env.Append(LINKFLAGS=['-no-pie']) - # Do the same for clang should be fine with Clang 4 and higher - if using_clang(env): - version = get_compiler_version(env) - if version != None and version[0] >= '4': - env.Append(CCFLAGS=['-fpie']) - env.Append(LINKFLAGS=['-no-pie']) + # -fpie and -no-pie is supported on GCC 6+ and Clang 4+, both below our + # minimal requirements. + env.Append(CCFLAGS=['-fpie']) + env.Append(LINKFLAGS=['-no-pie']) ## Dependencies @@ -318,8 +310,19 @@ def configure(env): env.ParseConfig('pkg-config zlib --cflags --libs') env.Prepend(CPPPATH=['#platform/x11']) - env.Append(CPPDEFINES=['X11_ENABLED', 'UNIX_ENABLED', 'OPENGL_ENABLED', 'GLES_ENABLED']) - env.Append(LIBS=['GL', 'pthread']) + env.Append(CPPDEFINES=['X11_ENABLED', 'UNIX_ENABLED']) + + env.Append(CPPDEFINES=['VULKAN_ENABLED']) + if not env['builtin_vulkan']: + env.ParseConfig('pkg-config vulkan --cflags --libs') + if not env['builtin_glslang']: + # No pkgconfig file for glslang so far + env.Append(LIBS=['glslang', 'SPIRV']) + + #env.Append(CPPDEFINES=['OPENGL_ENABLED']) + env.Append(LIBS=['GL']) + + env.Append(LIBS=['pthread']) if (platform.system() == "Linux"): env.Append(LIBS=['dl']) |