From 4334196ab325c6a19d618a392cddcc9f03adeb18 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sat, 28 Jul 2018 14:51:56 +0100 Subject: intel: tools: simplify meson build Remove the if tools condition and just put it through the install: parameter. Signed-off-by: Lionel Landwerlin Reviewed-by: Eric Engestrom --- src/intel/tools/meson.build | 96 +++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 46 deletions(-) (limited to 'src') diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build index 37bc04d8301..ac99adb4e1e 100644 --- a/src/intel/tools/meson.build +++ b/src/intel/tools/meson.build @@ -18,6 +18,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +build_intel_tools = with_tools.contains('intel') + aubinator = executable( 'aubinator', files('aubinator.c', 'intel_aub.h'), @@ -25,8 +27,8 @@ aubinator = executable( include_directories : [inc_common, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util], c_args : [c_vis_args, no_override_init_args], - build_by_default : with_tools.contains('intel'), - install : with_tools.contains('intel'), + build_by_default : build_intel_tools, + install : build_intel_tools ) aubinator_error_decode = executable( @@ -36,8 +38,8 @@ aubinator_error_decode = executable( include_directories : [inc_common, inc_intel], link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util], c_args : [c_vis_args, no_override_init_args], - build_by_default : with_tools.contains('intel'), - install : with_tools.contains('intel'), + build_by_default : build_intel_tools, + install : build_intel_tools ) error2aub = executable( @@ -47,50 +49,52 @@ error2aub = executable( include_directories : [inc_common, inc_intel, inc_drm_uapi], link_with : [libintel_dev], c_args : [c_vis_args, no_override_init_args], - build_by_default : with_tools.contains('intel'), - install : with_tools.contains('intel'), + build_by_default : build_intel_tools, + install : build_intel_tools ) -if with_tools.contains('intel') - sanitize_data = configuration_data() - sanitize_data.set( - 'install_libexecdir', - join_paths(get_option('prefix'), get_option('libexecdir')) - ) - configure_file( - input: 'intel_sanitize_gpu.in', - output: '@BASENAME@', - install_dir: get_option('bindir'), - configuration: sanitize_data, - ) +sanitize_data = configuration_data() +sanitize_data.set( + 'install_libexecdir', + join_paths(get_option('prefix'), get_option('libexecdir')) +) +configure_file( + input: 'intel_sanitize_gpu.in', + output: '@BASENAME@', + install_dir: get_option('bindir'), + install: build_intel_tools, + configuration: sanitize_data +) - libintel_sanitize_gpu = shared_library( - 'intel_sanitize_gpu', - files('intel_sanitize_gpu.c'), - dependencies : [dep_dl, dep_thread], - include_directories : [inc_common, inc_intel, inc_drm_uapi], - link_with : [libintel_common, libmesa_util], - c_args : [c_vis_args, no_override_init_args], - install_dir: get_option('libexecdir'), - install: true, - ) +libintel_sanitize_gpu = shared_library( + 'intel_sanitize_gpu', + files('intel_sanitize_gpu.c'), + dependencies : [dep_dl, dep_thread], + include_directories : [inc_common, inc_intel, inc_drm_uapi], + link_with : [libintel_common, libmesa_util], + c_args : [c_vis_args, no_override_init_args], + build_by_default : build_intel_tools, + install_dir: get_option('libexecdir'), + install: build_intel_tools +) - configure_file( - input : 'intel_dump_gpu.in', - output : '@BASENAME@', - install_dir: get_option('bindir'), - configuration: sanitize_data, - ) +configure_file( + input : 'intel_dump_gpu.in', + output : '@BASENAME@', + install_dir: get_option('bindir'), + configuration: sanitize_data, + install: build_intel_tools +) - libintel_dump_gpu = shared_library( - 'intel_dump_gpu', - files('gen_context.h', 'gen8_context.h', 'gen10_context.h', - 'intel_aub.h', 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c'), - dependencies : dep_dl, - include_directories : [inc_common, inc_intel, inc_drm_uapi], - link_with : libintel_dev, - c_args : [c_vis_args, no_override_init_args], - install_dir: get_option('libexecdir'), - install : true - ) -endif +libintel_dump_gpu = shared_library( + 'intel_dump_gpu', + files('gen_context.h', 'gen8_context.h', 'gen10_context.h', + 'intel_aub.h', 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c'), + dependencies : dep_dl, + include_directories : [inc_common, inc_intel, inc_drm_uapi], + link_with : libintel_dev, + c_args : [c_vis_args, no_override_init_args], + build_by_default : build_intel_tools, + install_dir: get_option('libexecdir'), + install: build_intel_tools +) -- cgit v1.2.3