meson: Make transport optional

transport and requester code has Linux-specific dependencies. Make
building those parts optional (enabled by default).

Change-Id: I1fff0e3cc0a1edb302eee664d5bccb0325429609
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/meson.options b/meson.options
index 0276f78..2b975fa 100644
--- a/meson.options
+++ b/meson.options
@@ -2,3 +2,4 @@
 option('abi-compliance-check', type: 'boolean', description: 'Detect public ABI/API changes')
 option('oem', type: 'array', description: 'Enable OEM PLDM extensions', choices: ['ibm', 'meta'], value: ['ibm', 'meta'])
 option('tests', type: 'boolean', description: 'Build tests')
+option('transport', type: 'boolean', description: 'Enable transport implementation')
diff --git a/src/meson.build b/src/meson.build
index 340f170..a8e54e7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,8 +1,11 @@
 libpldm_sources = files('responder.c', 'utils.c')
 
 subdir('dsp')
-subdir('requester')
-subdir('transport')
+
+if get_option('transport')
+    subdir('requester')
+    subdir('transport')
+endif
 
 if get_option('oem').contains('ibm')
     subdir('oem/ibm')