[igt-dev] [PATCH i-g-t] meson.build: Add FreeBSD OS detection

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Oct 17 08:00:31 UTC 2022


Hi Jake,

On 2022-10-16 at 12:27:25 -0500, Jake Freeland wrote:
> 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.

Put here also note about change from linux-uapi to freebsd-uapi.

> 
> 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')
--------------------------------------------------------- ^
freebsd-uapi

Regards,
Kamil

> +endif
>  
>  inc_for_gtkdoc = include_directories('lib')
>  
> -- 
> 2.37.3
> 


More information about the igt-dev mailing list