ref_vk: try another way to disable it on android

This commit is contained in:
Ivan Avdeev 2021-06-06 23:36:37 -07:00
parent c5bb450a5a
commit 1e82ae7103
2 changed files with 15 additions and 7 deletions

View File

@ -9,6 +9,10 @@ top = '.'
def options(opt):
grp = opt.add_option_group('ref_vk options')
grp.add_option('--disable-vulkan', action='store_false', dest='VK', default=True,
help = 'disable vulkan [default: vulkan is enabled]')
grp.add_option('', '--aftermath', action='store', dest = 'NSIGHT_AFTERMATH_SDK', default = None,
help = 'Path to Nvidia Nsight Aftermath SDK (optional)')
@ -17,8 +21,9 @@ def configure(conf):
if conf.options.DEDICATED:
return
# Vulkan is not supported on Android yet for CI reasons: requres NDK>12, glslc lookup etc.
if conf.env.DEST_OS == 'android':
conf.env.VK = conf.options.VK
if not conf.env.VK:
return
conf.load('glslc')
@ -55,6 +60,9 @@ def configure(conf):
conf.env.GLSLCFLAGS += ['-g']
def build(bld):
if not bld.env.VK:
return
libs = [ 'public', 'M' ]
defines = []
libpath = []
@ -77,11 +85,8 @@ def build(bld):
if bld.env.HAVE_AFTERMATH:
defines.append('USE_AFTERMATH')
libs.append('AFTERMATH')
# includes.append(bld.env.AFTERMATH_INCLUDE)
# libs.append(bld.env.AFTERMATH_LIB)
# libpath.append(bld.env.AFTERMATH_LIBDIR)
#bld.env.CFLAGS += ["/WX"]
#FIXME bld.env.CFLAGS += ["/WX"]
bld.shlib(
source = source,
@ -100,6 +105,6 @@ def build(bld):
features = 'glsl',
# includes = 'shaders/', # write your includes here
# defines = 'TEST', # write your C preprocessor defines here
install_path = bld.env.LIBDIR + '/valve' # TEMPORARY!!!!
install_path = bld.env.LIBDIR + '/valve' # FIXME TEMPORARY!!!!
)

View File

@ -131,11 +131,14 @@ def configure(conf):
conf.options.NANOGL = True
conf.options.GLWES = True
conf.options.GL = False
# Vulkan is not supported on Android yet for CI reasons: requres NDK>12, glslc lookup etc.
conf.options.VK = False
elif conf.env.MAGX:
conf.options.USE_SELECT = True
conf.options.SDL12 = True
conf.options.NO_VGUI = True
conf.options.GL = False
conf.options.VK = False
conf.options.LOW_MEMORY = 1
conf.options.SINGLE_BINARY = True
conf.options.NO_ASYNC_RESOLVE = True