2017-09-14 17:57:17 -07:00
|
|
|
# Copyright © 2017 Intel Corporation
|
2024-06-28 13:16:28 -07:00
|
|
|
# SPDX-License-Identifier: MIT
|
2017-09-14 17:57:17 -07:00
|
|
|
|
2022-11-08 16:12:10 +08:00
|
|
|
subdir('gtest')
|
|
|
|
|
subdir('c11/impl')
|
|
|
|
|
subdir('android_stub')
|
|
|
|
|
subdir('util')
|
|
|
|
|
|
2017-09-14 17:57:17 -07:00
|
|
|
inc_mesa = include_directories('mesa')
|
2017-09-20 20:11:32 -07:00
|
|
|
inc_src = include_directories('.')
|
2017-10-20 22:23:15 -07:00
|
|
|
inc_gallium = include_directories('gallium/include')
|
|
|
|
|
inc_gallium_aux = include_directories('gallium/auxiliary')
|
2025-01-09 19:33:12 -06:00
|
|
|
inc_amd_common = include_directories('amd/common', 'amd/common/nir')
|
2021-03-18 18:30:45 +01:00
|
|
|
inc_tool = include_directories('tool')
|
2025-06-25 16:55:27 +02:00
|
|
|
inc_virtio = include_directories('virtio')
|
2022-02-02 10:56:26 -08:00
|
|
|
inc_virtio_gpu = include_directories('virtio/virtio-gpu')
|
2023-01-11 10:48:49 -05:00
|
|
|
inc_frontends = include_directories('gallium/frontends')
|
2021-03-18 18:30:45 +01:00
|
|
|
pps_datasources = []
|
2021-03-17 11:27:30 -07:00
|
|
|
pps_includes = []
|
2017-09-20 20:11:32 -07:00
|
|
|
|
2023-06-07 10:51:22 +02:00
|
|
|
inc_llvmpipe = include_directories('gallium/drivers/llvmpipe')
|
|
|
|
|
|
2025-06-30 16:55:24 +00:00
|
|
|
if dep_llvm.found()
|
2020-07-31 16:39:10 +02:00
|
|
|
inc_amd_common_llvm = include_directories('amd/llvm')
|
|
|
|
|
else
|
|
|
|
|
inc_amd_common_llvm = []
|
|
|
|
|
endif
|
|
|
|
|
|
2023-01-17 17:57:43 +00:00
|
|
|
glsl_util_files = files(
|
2020-03-25 21:11:44 -04:00
|
|
|
'mesa/main/extensions_table.c',
|
2018-09-14 12:57:32 -07:00
|
|
|
'mesa/program/prog_parameter.c',
|
|
|
|
|
'mesa/program/symbol_table.c',
|
2017-12-11 15:56:08 -08:00
|
|
|
'mesa/program/dummy_errors.c',
|
2017-09-20 20:11:32 -07:00
|
|
|
)
|
|
|
|
|
|
2025-10-06 17:17:51 +02:00
|
|
|
sha1_h = custom_target(
|
|
|
|
|
'git_sha1.h',
|
2017-09-20 20:11:32 -07:00
|
|
|
output : 'git_sha1.h',
|
2025-10-06 17:17:51 +02:00
|
|
|
command : [prog_python, git_sha1_gen_py, '--output', '@OUTPUT@'],
|
|
|
|
|
build_by_default : true,
|
|
|
|
|
build_always_stale : true, # commit sha1 can change without having touched these files
|
2017-09-20 20:11:32 -07:00
|
|
|
)
|
2017-09-14 17:57:17 -07:00
|
|
|
|
2022-04-21 14:06:17 +08:00
|
|
|
if cc.get_argument_syntax() == 'msvc'
|
2018-02-08 13:10:12 -08:00
|
|
|
subdir('getopt')
|
|
|
|
|
else
|
|
|
|
|
idep_getopt = null_dep
|
|
|
|
|
endif
|
2025-07-15 17:50:31 -04:00
|
|
|
if with_platform_x11
|
|
|
|
|
subdir('x11')
|
|
|
|
|
endif
|
2025-01-04 20:57:17 +01:00
|
|
|
if with_gallium_or_lvp or with_gbm or with_platform_wayland
|
2022-09-01 00:59:52 +02:00
|
|
|
subdir('loader')
|
|
|
|
|
endif
|
2017-09-14 17:57:17 -07:00
|
|
|
subdir('compiler')
|
2025-10-06 12:57:04 +02:00
|
|
|
if with_poly
|
|
|
|
|
subdir('poly')
|
|
|
|
|
endif
|
2018-09-25 19:15:45 -07:00
|
|
|
if with_tools.contains('drm-shim')
|
|
|
|
|
subdir('drm-shim')
|
|
|
|
|
endif
|
2019-11-22 12:16:50 +01:00
|
|
|
if with_imgui
|
|
|
|
|
subdir('imgui')
|
|
|
|
|
endif
|
2025-07-02 14:06:38 +01:00
|
|
|
if with_wayland_bind_display
|
2018-10-11 16:00:04 +01:00
|
|
|
subdir('egl/wayland/wayland-drm')
|
|
|
|
|
endif
|
2020-10-30 10:44:17 +01:00
|
|
|
if with_any_vk or with_gallium_zink
|
2018-10-11 16:21:14 +01:00
|
|
|
subdir('vulkan')
|
|
|
|
|
endif
|
2025-06-25 16:57:18 +02:00
|
|
|
if with_virtio_vk
|
|
|
|
|
subdir('virtio/vulkan')
|
|
|
|
|
endif
|
|
|
|
|
if with_vdrm
|
|
|
|
|
subdir('virtio/vdrm')
|
2024-04-22 12:12:29 +02:00
|
|
|
endif
|
2022-05-03 08:17:57 +02:00
|
|
|
if with_gallium_radeonsi or with_amd_vk or with_gallium_r300 or with_gallium_r600
|
2017-11-13 11:16:28 -08:00
|
|
|
subdir('amd')
|
|
|
|
|
endif
|
2020-10-19 12:28:17 -07:00
|
|
|
if with_any_broadcom
|
2017-10-12 13:53:12 -07:00
|
|
|
subdir('broadcom')
|
|
|
|
|
endif
|
2019-05-31 14:35:08 +02:00
|
|
|
if with_gallium_etnaviv
|
|
|
|
|
subdir('etnaviv')
|
|
|
|
|
endif
|
2021-10-24 20:06:20 -04:00
|
|
|
if with_gallium_freedreno or with_freedreno_vk or with_tools.contains('freedreno')
|
2018-11-11 10:10:46 -05:00
|
|
|
subdir('freedreno')
|
|
|
|
|
endif
|
2024-12-24 12:56:52 +00:00
|
|
|
if with_imagination_vk or with_tools.contains('imagination')
|
2022-02-25 10:28:39 +00:00
|
|
|
subdir('imagination')
|
|
|
|
|
endif
|
2024-07-20 20:07:54 +03:00
|
|
|
if with_any_intel
|
|
|
|
|
subdir('intel')
|
|
|
|
|
endif
|
2021-07-21 15:14:17 -04:00
|
|
|
if with_gallium_panfrost or with_gallium_lima or with_panfrost_vk or with_tools.contains('panfrost')
|
2019-06-18 11:16:21 -07:00
|
|
|
subdir('panfrost')
|
|
|
|
|
endif
|
2021-06-24 13:09:35 +02:00
|
|
|
if with_microsoft_clc or with_gallium_d3d12 or with_spirv_to_dxil or with_microsoft_vk
|
2019-05-26 10:43:12 +02:00
|
|
|
subdir('microsoft')
|
|
|
|
|
endif
|
2022-05-16 22:39:44 +02:00
|
|
|
if with_any_nouveau
|
2021-01-09 01:33:08 -05:00
|
|
|
subdir('nouveau')
|
|
|
|
|
endif
|
2024-01-24 10:12:31 -08:00
|
|
|
if with_gfxstream_vk
|
2025-06-18 07:33:00 -07:00
|
|
|
dep_virtgpu_kumquat_ffi = null_dep
|
2024-12-16 13:09:54 -08:00
|
|
|
if with_virtgpu_kumquat
|
|
|
|
|
subdir('util/rust')
|
|
|
|
|
subdir('virtio/protocols')
|
|
|
|
|
subdir('virtio/virtgpu_kumquat')
|
|
|
|
|
subdir('virtio/virtgpu_kumquat_ffi')
|
|
|
|
|
endif
|
2024-01-24 10:12:31 -08:00
|
|
|
subdir('gfxstream')
|
|
|
|
|
endif
|
2025-02-22 11:20:25 +01:00
|
|
|
if with_gallium_asahi or with_asahi_vk or with_tools.contains('asahi')
|
2021-04-10 20:17:21 -04:00
|
|
|
subdir('asahi')
|
|
|
|
|
endif
|
2025-09-23 10:24:52 +02:00
|
|
|
if with_kosmickrisp_vk
|
|
|
|
|
subdir('kosmickrisp')
|
|
|
|
|
endif
|
2017-11-14 17:03:39 -08:00
|
|
|
if with_gallium
|
2021-12-07 14:29:29 +10:00
|
|
|
subdir('mesa')
|
2024-07-30 12:58:14 +02:00
|
|
|
endif
|
|
|
|
|
if with_gallium_or_lvp
|
2017-11-14 17:03:39 -08:00
|
|
|
subdir('gallium')
|
2024-07-30 12:58:14 +02:00
|
|
|
endif
|
2024-12-26 14:35:44 -05:00
|
|
|
# These require libgallium (shared_glapi_lib)
|
|
|
|
|
if with_gallium and (with_glx != 'disabled' or with_egl)
|
|
|
|
|
if with_gles1 and not with_glvnd
|
2025-08-04 15:31:33 -04:00
|
|
|
subdir('mesa/glapi/es1api')
|
2024-12-26 14:35:44 -05:00
|
|
|
endif
|
|
|
|
|
if with_gles2 and not with_glvnd
|
2025-08-04 15:31:33 -04:00
|
|
|
subdir('mesa/glapi/es2api')
|
2024-12-26 14:35:44 -05:00
|
|
|
endif
|
2025-03-03 15:39:31 -05:00
|
|
|
if with_tests
|
2024-12-26 14:35:44 -05:00
|
|
|
subdir('mesa/main/tests')
|
2018-04-18 09:29:35 -07:00
|
|
|
subdir('mesa/state_tracker/tests')
|
|
|
|
|
endif
|
2017-11-14 17:03:39 -08:00
|
|
|
endif
|
2024-07-19 13:12:08 -04:00
|
|
|
if with_glx == 'dri'
|
|
|
|
|
subdir('glx')
|
|
|
|
|
endif
|
2025-03-05 13:14:02 +03:00
|
|
|
|
2024-06-18 13:23:08 -04:00
|
|
|
if with_gbm
|
2025-03-05 13:14:02 +03:00
|
|
|
if get_option('libgbm-external')
|
|
|
|
|
dep_gbm = dependency('gbm')
|
|
|
|
|
else
|
|
|
|
|
subdir('gbm')
|
|
|
|
|
endif
|
2024-06-18 13:23:08 -04:00
|
|
|
else
|
2025-03-05 13:14:02 +03:00
|
|
|
dep_gbm = null_dep
|
2024-06-18 13:23:08 -04:00
|
|
|
endif
|
2025-03-05 13:14:02 +03:00
|
|
|
|
2021-09-01 09:31:04 -07:00
|
|
|
if with_egl
|
|
|
|
|
subdir('egl')
|
|
|
|
|
endif
|
2026-01-18 15:25:12 +01:00
|
|
|
if with_gallium
|
2024-06-18 13:23:08 -04:00
|
|
|
if with_glx == 'dri' or with_platform_x11 or with_platform_xcb
|
|
|
|
|
subdir('gallium/targets/dril')
|
|
|
|
|
endif
|
|
|
|
|
endif
|
2017-11-02 16:51:40 -07:00
|
|
|
|
2025-03-05 13:14:02 +03:00
|
|
|
if with_gbm and with_dri2
|
|
|
|
|
subdir('gbm/backends/dri')
|
|
|
|
|
endif
|
|
|
|
|
|
2017-11-02 16:51:40 -07:00
|
|
|
# This must be after at least mesa, glx, and gallium, since libgl will be
|
|
|
|
|
# defined in one of those subdirs depending on the glx provider.
|
2019-09-25 17:38:49 +01:00
|
|
|
if with_glx != 'disabled' and not with_glvnd
|
2017-11-02 16:51:40 -07:00
|
|
|
pkg.generate(
|
|
|
|
|
name : 'gl',
|
|
|
|
|
description : 'Mesa OpenGL Library',
|
|
|
|
|
version : meson.project_version(),
|
2019-09-25 17:38:49 +01:00
|
|
|
libraries : libgl,
|
2017-11-02 16:51:40 -07:00
|
|
|
libraries_private : gl_priv_libs,
|
|
|
|
|
requires_private : gl_priv_reqs,
|
2022-06-21 15:33:07 +08:00
|
|
|
variables : ['glx_tls=yes'],
|
2017-11-02 16:51:40 -07:00
|
|
|
)
|
|
|
|
|
endif
|
2021-03-18 18:30:45 +01:00
|
|
|
|
|
|
|
|
subdir('tool')
|