with_asm = get_option('asm')
with_osmesa = get_option('osmesa')
with_swr_arches = get_option('swr-arches').split(',')
+with_tools = get_option('tools').split(',')
+if with_tools.contains('all')
+ with_tools = ['freedreno', 'glsl', 'intel', 'nir', 'nouveau']
+endif
if get_option('texture-float')
pre_args += '-DTEXTURE_FLOAT_ENABLED'
message('WARNING: Floating-point texture enabled. Please consult docs/patents.txt and your lawyer before building mesa.')
value : 'avx,avx2',
description : 'Comma delemited swr architectures. choices : avx,avx2,knl,skx'
)
+option(
+ 'tools',
+ type : 'string',
+ value : '',
+ description : 'Comma delimited list of tools to build. choices : freedreno,glsl,intel,nir,nouveau or all'
+)
dependencies : [dep_clock, dep_thread],
include_directories : [inc_common],
link_with : [libglsl_standalone],
- build_by_default : false,
+ build_by_default : with_tools.contains('glsl'),
+ install : with_tools.contains('glsl'),
)
glsl_test = executable(
include_directories : [inc_common],
dependencies : [dep_clock, dep_thread],
link_with : [libglsl, libglsl_standalone, libglsl_util],
- build_by_default : false,
+ build_by_default : with_tools.contains('glsl'),
+ install : with_tools.contains('glsl'),
)
if with_tests
include_directories : [inc_common, inc_nir, include_directories('spirv')],
link_with : libmesa_util,
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
- build_by_default : false,
+ build_by_default : with_tools.contains('nir'),
+ install : with_tools.contains('nir'),
)
subdir('glsl')
libglsl_standalone,
libmesa_util,
],
- build_by_default : true,
+ build_by_default : with_tools.contains('freedreno'),
+ install : with_tools.contains('freedreno'),
)
include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
dependencies : [dep_libdrm, dep_libdrm_nouveau],
link_with : [libnouveau, libgallium, libmesa_util],
- build_by_default : false,
+ build_by_default : with_tools.contains('nouveau'),
+ install : with_tools.contains('nouveau'),
)
driver_nouveau = declare_dependency(
include_directories : [inc_common, inc_intel],
link_with : [libintel_common, libintel_compiler, libmesa_util],
c_args : [c_vis_args, no_override_init_args],
- build_by_default : false,
+ build_by_default : with_tools.contains('intel'),
+ install : with_tools.contains('intel'),
)
aubinator_error_decode = executable(
include_directories : [inc_common, inc_intel],
link_with : [libintel_common, libintel_compiler, libmesa_util],
c_args : [c_vis_args, no_override_init_args],
- build_by_default : false,
+ build_by_default : with_tools.contains('intel'),
+ install : with_tools.contains('intel'),
)