meson: Make orcc detectable from other subprojects
authorSeungha Yang <seungha.yang@navercorp.com>
Mon, 28 Jan 2019 13:12:46 +0000 (22:12 +0900)
committerSeungha Yang <seungha.yang@navercorp.com>
Wed, 30 Jan 2019 10:15:46 +0000 (19:15 +0900)
If we are a subproject (e.g., gst-build), this can make it possible
to use orcc by other subprojects.

tools/meson.build

index d1a0b8f..95ccb75 100644 (file)
@@ -2,6 +2,11 @@ orcc = executable ('orcc', 'orcc.c',
                    install: true,
                    dependencies : [libm, orc_dep])
 
+# Make orcc usable for other subprojects
+if meson.has_exe_wrapper()
+  meson.override_find_program('orcc', orcc)
+endif
+
 orc_bugreport = executable ('orc-bugreport', 'orc-bugreport.c',
                             install: true,
                             dependencies : [orc_dep, orc_test_dep])