2017-09-14 17:57:17 -07:00
|
|
|
# Copyright © 2017 Intel Corporation
|
|
|
|
|
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
|
# SOFTWARE.
|
|
|
|
|
|
|
|
|
|
inc_mesa = include_directories('mesa')
|
|
|
|
|
inc_mapi = include_directories('mapi')
|
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')
|
2017-10-25 18:55:38 -07:00
|
|
|
inc_amd_common = include_directories('amd/common')
|
2021-03-18 18:30:45 +01:00
|
|
|
inc_tool = include_directories('tool')
|
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
|
|
|
|
2020-07-31 16:39:10 +02:00
|
|
|
if with_llvm
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
|
2017-10-24 18:03:39 +01:00
|
|
|
sha1_h = custom_target(
|
|
|
|
|
'git_sha1.h',
|
2017-09-20 20:11:32 -07:00
|
|
|
output : 'git_sha1.h',
|
2018-08-09 10:27:26 +02:00
|
|
|
command : [prog_python, git_sha1_gen_py, '--output', '@OUTPUT@'],
|
2020-04-24 12:29:42 -07:00
|
|
|
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
|
|
|
|
|
|
|
|
subdir('gtest')
|
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
|
2020-07-28 15:25:49 -07:00
|
|
|
subdir('android_stub')
|
2022-02-19 13:19:08 +08:00
|
|
|
subdir('c11/impl')
|
2017-09-14 17:57:17 -07:00
|
|
|
subdir('util')
|
2022-11-05 08:47:04 +00:00
|
|
|
if with_gallium
|
|
|
|
|
subdir('mapi')
|
|
|
|
|
endif
|
2017-09-14 17:57:17 -07:00
|
|
|
subdir('compiler')
|
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
|
2018-10-11 16:00:04 +01:00
|
|
|
if with_platform_wayland
|
|
|
|
|
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
|
2022-01-20 11:55:26 +10:00
|
|
|
if with_any_intel
|
|
|
|
|
subdir('intel')
|
|
|
|
|
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
|
2022-02-25 10:28:39 +00:00
|
|
|
if with_imagination_vk
|
|
|
|
|
subdir('imagination')
|
|
|
|
|
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
|
2020-06-03 13:18:30 -07:00
|
|
|
if with_gallium_virgl or with_virtio_vk
|
2020-07-02 11:06:15 -07:00
|
|
|
subdir('virtio')
|
|
|
|
|
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
|
2021-01-09 01:33:08 -05:00
|
|
|
if with_gallium_nouveau
|
|
|
|
|
subdir('nouveau')
|
|
|
|
|
endif
|
2021-04-21 01:06:41 +05:30
|
|
|
if with_gallium_asahi or with_tools.contains('asahi')
|
2021-04-10 20:17:21 -04:00
|
|
|
subdir('asahi')
|
|
|
|
|
endif
|
2022-11-05 08:47:04 +00:00
|
|
|
if with_gallium or with_gbm
|
|
|
|
|
subdir('loader')
|
|
|
|
|
endif
|
2017-09-28 15:53:53 -07:00
|
|
|
if with_gbm
|
|
|
|
|
subdir('gbm')
|
2018-01-03 12:33:55 -08:00
|
|
|
else
|
|
|
|
|
inc_gbm = []
|
2017-09-28 15:53:53 -07:00
|
|
|
endif
|
2017-11-14 17:03:39 -08:00
|
|
|
if with_gallium
|
2021-12-07 14:29:29 +10:00
|
|
|
subdir('mesa')
|
2017-11-14 17:03:39 -08:00
|
|
|
subdir('gallium')
|
2021-12-07 14:29:29 +10:00
|
|
|
if with_glx == 'dri'
|
|
|
|
|
subdir('glx')
|
|
|
|
|
endif
|
2018-02-06 15:46:25 -08:00
|
|
|
# This has to be here since it requires libgallium, and subdir cannot
|
|
|
|
|
# contain ..
|
2021-12-07 14:29:29 +10:00
|
|
|
if with_tests
|
|
|
|
|
subdir('mesa/main/tests')
|
|
|
|
|
endif
|
2018-10-05 09:36:05 -07:00
|
|
|
if with_tests and with_shared_glapi
|
2018-04-18 09:29:35 -07:00
|
|
|
subdir('mesa/state_tracker/tests')
|
|
|
|
|
endif
|
2017-11-14 17:03:39 -08:00
|
|
|
endif
|
2021-09-01 09:31:04 -07:00
|
|
|
if with_egl
|
|
|
|
|
subdir('egl')
|
|
|
|
|
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')
|