From 1e70e48c39e13cf0c74d995fe2f745bcb85d0f19 Mon Sep 17 00:00:00 2001 From: Thies Moeller Date: Wed, 10 May 2023 09:24:44 +0200 Subject: [PATCH] fix case where PYLON_ROOT is defined to wrong location --- gst-libs/gst/pylon/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/pylon/meson.build b/gst-libs/gst/pylon/meson.build index 59dd5bb..b2473e8 100644 --- a/gst-libs/gst/pylon/meson.build +++ b/gst-libs/gst/pylon/meson.build @@ -5,7 +5,9 @@ # import PYLON_ROOT environment into meson pylon_path = run_command(python3, '-c', 'import os; print(os.environ.get("PYLON_ROOT","PYLON_ROOT_NOT_SET"))', check: false).stdout().strip() -if target_machine.system() == 'linux' and pylon_path == 'PYLON_ROOT_NOT_SET' +fs = import('fs') + +if target_machine.system() == 'linux' and (pylon_path == 'PYLON_ROOT_NOT_SET' or not fs.exists(pylon_path / 'include/pylon')) # PYLON_ROOT has to be set error('PYLON_ROOT has to be set to location of pylon install e.g. /opt/pylon') endif