meson: Add lmsensors support

v2: - Make -Dlmsensors=false work
    - Simplify auto and true cases

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Dylan Baker
2017-11-28 16:42:37 -08:00
parent 7309207432
commit 5e71efef44
7 changed files with 25 additions and 4 deletions

View File

@@ -926,6 +926,17 @@ if get_option('gallium-extra-hud')
pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
endif
_sensors = get_option('lmsensors')
if _sensors != 'false'
dep_lmsensors = cc.find_library('libsensors', required : _sensors == 'true')
if dep_lmsensors.found()
pre_args += '-DHAVE_LIBSENSORS=1'
endif
else
dep_lmsensors = []
endif
# TODO: nine
# TODO: clover