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>tags/18.0-branchpoint
@@ -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 |
@@ -157,6 +157,13 @@ option( | |||
choices : ['auto', 'true', 'false'], | |||
description : 'Use libunwind for stack-traces' | |||
) | |||
option( | |||
'lmsensors', | |||
type : 'combo', | |||
value : 'auto', | |||
choices : ['auto', 'true', 'false'], | |||
description : 'Enable HUD lmsensors support.' | |||
) | |||
option( | |||
'build-tests', | |||
type : 'boolean', |
@@ -97,6 +97,6 @@ etnaviv_compiler = executable( | |||
'etnaviv_compiler_cmdline.c', | |||
include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux], | |||
link_with : [libmesa_util, libgallium, libetnaviv], | |||
dependencies : dep_libdrm_etnaviv, | |||
dependencies : [dep_libdrm_etnaviv, dep_lmsensors], | |||
build_by_default : false, | |||
) |
@@ -218,6 +218,7 @@ ir3_compiler = executable( | |||
dep_libdrm, | |||
dep_libdrm_freedreno, | |||
dependency('threads'), | |||
dep_lmsensors, | |||
], | |||
link_with : [ | |||
libfreedreno, |
@@ -217,7 +217,7 @@ nouveau_compiler = executable( | |||
'nouveau_compiler', | |||
'nouveau_compiler.c', | |||
include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux], | |||
dependencies : [dep_libdrm, dep_libdrm_nouveau], | |||
dependencies : [dep_libdrm, dep_libdrm_nouveau, dep_lmsensors], | |||
link_with : [libnouveau, libgallium, libmesa_util], | |||
build_by_default : false, | |||
) |
@@ -150,7 +150,9 @@ if with_tests | |||
include_directories('compiler'), | |||
], | |||
link_with : [libr300, libgallium, libmesa_util], | |||
dependencies : [dep_m, dep_clock, dep_dl, dep_thread, dep_unwind], | |||
dependencies : [ | |||
dep_m, dep_clock, dep_dl, dep_thread, dep_unwind, dep_lmsensors, | |||
], | |||
) | |||
) | |||
endif |
@@ -163,7 +163,7 @@ libgallium_dri = shared_library( | |||
], | |||
dependencies : [ | |||
gallium_dri_depends, dep_selinux, dep_expat, dep_libdrm, dep_llvm, | |||
dep_thread, | |||
dep_thread, dep_lmsensors, | |||
], | |||
) | |||