cpuinfoapp: Make PECI features optional

Add a feature flag `cpuinfo-peci` to optionally disable the features in
cpuinfoapp that rely on PECI (PPIN, SST), to support configurations that
want I2C-based SSPEC detection but don't want to use libpeci.

Tested: Disabled `cpuinfo-peci` and verified SSPEC was still written
into the Model property.

Change-Id: Ie3ab9214d9d6ab238a61933de3e3856eca298fa8
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
diff --git a/src/meson.build b/src/meson.build
index 620eae4..229842f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -36,15 +36,21 @@
   # i2c-tools provides no pkgconfig so we need to find it manually
   i2c_dep = cpp.find_library('i2c')
 
-  peci_dep = dependency('libpeci')
+  peci_dep = []
+  peci_flag = []
+  peci_files = []
+  if get_option('cpuinfo-peci').allowed()
+    peci_flag = '-DPECI_ENABLED=1'
+    peci_dep = dependency('libpeci')
+    peci_files = ['speed_select.cpp', 'sst_mailbox.cpp']
+  endif
 
   executable(
     'cpuinfoapp',
     'cpuinfo_main.cpp',
-    'speed_select.cpp',
-    'sst_mailbox.cpp',
     'cpuinfo_utils.cpp',
-    cpp_args: boost_args,
+    peci_files,
+    cpp_args: boost_args + peci_flag,
     dependencies: [
       boost_dep,
       sdbusplus_dep,