[igt-dev] [PATCH i-g-t] meson.build: Add FreeBSD OS detection
Jake Freeland
jake at technologyfriends.net
Sun Oct 16 17:27:25 UTC 2022
Use meson's host_machine.system() to detect the target operating
system. If the target is FreeBSD, add /usr/local/include to the
include dirs.
Signed-off-by: Jake Freeland <jfree at freebsd.org>
---
meson.build | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meson.build b/meson.build
index 3e937f5a..896efbf8 100644
--- a/meson.build
+++ b/meson.build
@@ -86,7 +86,12 @@ with_libdrm = get_option('libdrm_drivers')
build_info = ['Build type: ' + get_option('buildtype')]
+system = host_machine.system()
+if system == 'linux'
inc = include_directories('include/drm-uapi', 'include/linux-uapi', 'lib', 'lib/stubs/syscalls', '.')
+elif system == 'freebsd'
+inc = include_directories('include/drm-uapi', 'include/linux-uapi', 'lib', 'lib/stubs/syscalls', '.', '/usr/local/include')
+endif
inc_for_gtkdoc = include_directories('lib')
--
2.37.3
More information about the igt-dev
mailing list