From 8a7fa50bb2fcc8fc414f7a4adc5bd16cadbe018c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 11 Oct 2023 16:00:23 +0200 Subject: [PATCH] build: make benchmark optional --- meson_options.txt | 1 + src/meson.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index 8075f3e55..1d403fec4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,3 +2,4 @@ option('pipewire', type: 'feature', description: 'Screen capture via PipeWire') option('enable_gamescope', type : 'boolean', value : true, description: 'Build Gamescope executable') option('enable_gamescope_wsi_layer', type : 'boolean', value : true, description: 'Build Gamescope layer') option('enable_openvr_support', type : 'boolean', value : true, description: 'OpenVR Integrations') +option('benchmark', type: 'feature', description: 'Benchmark tools') diff --git a/src/meson.build b/src/meson.build index c63cbd7bb..60d6b5a3b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -139,7 +139,7 @@ endif ) -benchmark_dep = dependency('benchmark') +benchmark_dep = dependency('benchmark', required: get_option('benchmark'), disabler: true) executable('gamescope_color_microbench', ['color_bench.cpp', 'color_helpers.cpp'], dependencies:[benchmark_dep, glm_dep]) executable('gamescope_color_tests', ['color_tests.cpp', 'color_helpers.cpp'], dependencies:[glm_dep])