build: Remove dynamicsensor library if it is not enabled

Use the meson option to not include the dynamiccmds lib if it is
disabled.

Without removing this, the dbus-sdr implmentation will always take
over the other handler implmentation.

Change-Id: I15f51dbd3dcb9e9b78e61f3f6b11991f75b42cc7
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/meson.build b/meson.build
index bfb417f..66b7ca9 100644
--- a/meson.build
+++ b/meson.build
@@ -255,15 +255,17 @@
 # Dynamic Sensor Stack
 subdir('dbus-sdr')
 
-library(
-  'dynamiccmds',
-  dbus_sdr_src,
-  implicit_include_directories: false,
-  dependencies: dbus_sdr_pre,
-  version: meson.project_version(),
-  override_options: ['b_lundef=false'],
-  install: true,
-  install_dir: get_option('libdir') / 'ipmid-providers')
+if not get_option('dynamic-sensors').disabled()
+  library(
+    'dynamiccmds',
+    dbus_sdr_src,
+    implicit_include_directories: false,
+    dependencies: dbus_sdr_pre,
+    version: meson.project_version(),
+    override_options: ['b_lundef=false'],
+    install: true,
+    install_dir: get_option('libdir') / 'ipmid-providers')
+endif
 
 if not get_option('tests').disabled()
   subdir('test')