build: Make it possible to use as a subproject

We can't pull in nested subprojects with meson, but we can still
leverage it to download the project and use clever symlinking to build.

Change-Id: I54099df45cb5f5757f2ed36d3ca20ba8206e0281
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meson.build b/meson.build
index b23a085..356e737 100644
--- a/meson.build
+++ b/meson.build
@@ -34,8 +34,12 @@
   tests_str = 'auto'
 endif
 
-subproject('acpi-power-state-daemon')
-subproject('ncsid', default_options: 'tests=' + tests_str)
-subproject('metrics-ipmi-blobs', default_options: 'tests=' + tests_str)
-subproject('nemora-postd')
-subproject('libcr51sign')
+# The ordering in this list intentionally lists dependencies higher than
+# dependents to guarantee their tests are enabled
+if not meson.is_subproject()
+  subproject('acpi-power-state-daemon')
+  subproject('ncsid', default_options: 'tests=' + tests_str)
+  subproject('metrics-ipmi-blobs', default_options: 'tests=' + tests_str)
+  subproject('nemora-postd')
+  subproject('libcr51sign')
+endif