2017-09-15 01:57:17 +01: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-21 04:11:32 +01:00
|
|
|
inc_src = include_directories('.')
|
2017-10-21 06:23:15 +01:00
|
|
|
inc_gallium = include_directories('gallium/include')
|
|
|
|
inc_gallium_aux = include_directories('gallium/auxiliary')
|
2017-10-26 02:55:38 +01:00
|
|
|
inc_amd_common = include_directories('amd/common')
|
2021-03-18 17:30:45 +00:00
|
|
|
inc_tool = include_directories('tool')
|
2022-02-02 18:56:26 +00:00
|
|
|
inc_virtio_gpu = include_directories('virtio/virtio-gpu')
|
2023-01-11 15:48:49 +00:00
|
|
|
inc_frontends = include_directories('gallium/frontends')
|
2021-03-18 17:30:45 +00:00
|
|
|
pps_datasources = []
|
2021-03-17 18:27:30 +00:00
|
|
|
pps_includes = []
|
2017-09-21 04:11:32 +01:00
|
|
|
|
2020-07-31 15:39:10 +01: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-26 01:11:44 +00:00
|
|
|
'mesa/main/extensions_table.c',
|
2018-09-14 20:57:32 +01:00
|
|
|
'mesa/program/prog_parameter.c',
|
|
|
|
'mesa/program/symbol_table.c',
|
2017-12-11 23:56:08 +00:00
|
|
|
'mesa/program/dummy_errors.c',
|
2017-09-21 04:11:32 +01:00
|
|
|
)
|
|
|
|
|
2017-10-24 18:03:39 +01:00
|
|
|
sha1_h = custom_target(
|
|
|
|
'git_sha1.h',
|
2017-09-21 04:11:32 +01:00
|
|
|
output : 'git_sha1.h',
|
2018-08-09 09:27:26 +01:00
|
|
|
command : [prog_python, git_sha1_gen_py, '--output', '@OUTPUT@'],
|
2020-04-24 20:29:42 +01:00
|
|
|
build_by_default : true,
|
|
|
|
build_always_stale : true, # commit sha1 can change without having touched these files
|
2017-09-21 04:11:32 +01:00
|
|
|
)
|
2017-09-15 01:57:17 +01:00
|
|
|
|
|
|
|
subdir('gtest')
|
2022-04-21 07:06:17 +01:00
|
|
|
if cc.get_argument_syntax() == 'msvc'
|
2018-02-08 21:10:12 +00:00
|
|
|
subdir('getopt')
|
|
|
|
else
|
|
|
|
idep_getopt = null_dep
|
|
|
|
endif
|
2020-07-28 23:25:49 +01:00
|
|
|
subdir('android_stub')
|
2022-02-19 05:19:08 +00:00
|
|
|
subdir('c11/impl')
|
2017-09-15 01:57:17 +01:00
|
|
|
subdir('util')
|
2022-11-05 08:47:04 +00:00
|
|
|
if with_gallium
|
|
|
|
subdir('mapi')
|
|
|
|
endif
|
2017-09-15 01:57:17 +01:00
|
|
|
subdir('compiler')
|
2018-09-26 03:15:45 +01:00
|
|
|
if with_tools.contains('drm-shim')
|
|
|
|
subdir('drm-shim')
|
|
|
|
endif
|
2019-11-22 11:16:50 +00: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 09:44:17 +00:00
|
|
|
if with_any_vk or with_gallium_zink
|
2018-10-11 16:21:14 +01:00
|
|
|
subdir('vulkan')
|
|
|
|
endif
|
2022-01-20 01:55:26 +00:00
|
|
|
if with_any_intel
|
|
|
|
subdir('intel')
|
|
|
|
endif
|
2022-05-03 07:17:57 +01:00
|
|
|
if with_gallium_radeonsi or with_amd_vk or with_gallium_r300 or with_gallium_r600
|
2017-11-13 19:16:28 +00:00
|
|
|
subdir('amd')
|
|
|
|
endif
|
2020-10-19 20:28:17 +01:00
|
|
|
if with_any_broadcom
|
2017-10-12 21:53:12 +01:00
|
|
|
subdir('broadcom')
|
|
|
|
endif
|
2019-05-31 13:35:08 +01:00
|
|
|
if with_gallium_etnaviv
|
|
|
|
subdir('etnaviv')
|
|
|
|
endif
|
2021-10-25 01:06:20 +01:00
|
|
|
if with_gallium_freedreno or with_freedreno_vk or with_tools.contains('freedreno')
|
2018-11-11 15:10:46 +00:00
|
|
|
subdir('freedreno')
|
|
|
|
endif
|
2022-02-25 10:28:39 +00:00
|
|
|
if with_imagination_vk
|
|
|
|
subdir('imagination')
|
|
|
|
endif
|
2021-07-21 20:14:17 +01:00
|
|
|
if with_gallium_panfrost or with_gallium_lima or with_panfrost_vk or with_tools.contains('panfrost')
|
2019-06-18 19:16:21 +01:00
|
|
|
subdir('panfrost')
|
|
|
|
endif
|
2020-06-03 21:18:30 +01:00
|
|
|
if with_gallium_virgl or with_virtio_vk
|
2020-07-02 19:06:15 +01:00
|
|
|
subdir('virtio')
|
|
|
|
endif
|
2021-06-24 12:09:35 +01:00
|
|
|
if with_microsoft_clc or with_gallium_d3d12 or with_spirv_to_dxil or with_microsoft_vk
|
2019-05-26 09:43:12 +01:00
|
|
|
subdir('microsoft')
|
|
|
|
endif
|
2021-01-09 06:33:08 +00:00
|
|
|
if with_gallium_nouveau
|
|
|
|
subdir('nouveau')
|
|
|
|
endif
|
2021-04-20 20:36:41 +01:00
|
|
|
if with_gallium_asahi or with_tools.contains('asahi')
|
2021-04-11 01:17:21 +01:00
|
|
|
subdir('asahi')
|
|
|
|
endif
|
2022-11-05 08:47:04 +00:00
|
|
|
if with_gallium or with_gbm
|
|
|
|
subdir('loader')
|
|
|
|
endif
|
2017-09-28 23:53:53 +01:00
|
|
|
if with_gbm
|
|
|
|
subdir('gbm')
|
2018-01-03 20:33:55 +00:00
|
|
|
else
|
|
|
|
inc_gbm = []
|
2017-09-28 23:53:53 +01:00
|
|
|
endif
|
2017-11-15 01:03:39 +00:00
|
|
|
if with_gallium
|
2021-12-07 04:29:29 +00:00
|
|
|
subdir('mesa')
|
2017-11-15 01:03:39 +00:00
|
|
|
subdir('gallium')
|
2021-12-07 04:29:29 +00:00
|
|
|
if with_glx == 'dri'
|
|
|
|
subdir('glx')
|
|
|
|
endif
|
2018-02-06 23:46:25 +00:00
|
|
|
# This has to be here since it requires libgallium, and subdir cannot
|
|
|
|
# contain ..
|
2021-12-07 04:29:29 +00:00
|
|
|
if with_tests
|
|
|
|
subdir('mesa/main/tests')
|
|
|
|
endif
|
2018-10-05 17:36:05 +01:00
|
|
|
if with_tests and with_shared_glapi
|
2018-04-18 17:29:35 +01:00
|
|
|
subdir('mesa/state_tracker/tests')
|
|
|
|
endif
|
2017-11-15 01:03:39 +00:00
|
|
|
endif
|
2021-09-01 17:31:04 +01:00
|
|
|
if with_egl
|
|
|
|
subdir('egl')
|
|
|
|
endif
|
2017-11-02 23:51:40 +00: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 23:51:40 +00: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 23:51:40 +00:00
|
|
|
libraries_private : gl_priv_libs,
|
|
|
|
requires_private : gl_priv_reqs,
|
2022-06-21 08:33:07 +01:00
|
|
|
variables : ['glx_tls=yes'],
|
2017-11-02 23:51:40 +00:00
|
|
|
)
|
|
|
|
endif
|
2021-03-18 17:30:45 +00:00
|
|
|
|
|
|
|
subdir('tool')
|