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')
|
2019-09-27 09:29:51 +01:00
|
|
|
inc_amd_common_llvm = include_directories('amd/llvm')
|
2017-09-21 04:11:32 +01:00
|
|
|
|
|
|
|
libglsl_util = static_library(
|
|
|
|
'glsl_util',
|
2017-12-11 23:56:08 +00:00
|
|
|
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',
|
|
|
|
),
|
2019-03-05 16:21:47 +00:00
|
|
|
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
2020-11-17 19:29:52 +00:00
|
|
|
dependencies : dep_valgrind,
|
2020-04-24 21:10:41 +01:00
|
|
|
gnu_symbol_visibility : 'hidden',
|
2017-09-21 04:11:32 +01:00
|
|
|
build_by_default : false,
|
|
|
|
)
|
|
|
|
|
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')
|
2018-02-08 21:10:12 +00:00
|
|
|
if cc.get_id() == 'msvc'
|
|
|
|
subdir('getopt')
|
|
|
|
else
|
|
|
|
idep_getopt = null_dep
|
|
|
|
endif
|
2020-07-28 23:25:49 +01:00
|
|
|
subdir('android_stub')
|
2017-09-15 01:57:17 +01:00
|
|
|
subdir('util')
|
2017-09-21 04:11:32 +01:00
|
|
|
subdir('mapi')
|
2017-09-15 01:57:17 +01:00
|
|
|
# TODO: opengl
|
|
|
|
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
|
2017-11-13 19:16:28 +00:00
|
|
|
if with_gallium_radeonsi or with_amd_vk
|
|
|
|
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
|
2018-08-08 23:23:57 +01:00
|
|
|
if with_gallium_freedreno or with_freedreno_vk
|
2018-11-11 15:10:46 +00:00
|
|
|
subdir('freedreno')
|
|
|
|
endif
|
2019-06-18 19:16:21 +01:00
|
|
|
if with_gallium_panfrost or with_gallium_lima
|
|
|
|
subdir('panfrost')
|
|
|
|
endif
|
2020-07-02 19:06:15 +01:00
|
|
|
if with_gallium_virgl
|
|
|
|
subdir('virtio')
|
|
|
|
endif
|
2020-10-19 20:28:17 +01:00
|
|
|
if with_any_intel
|
2017-11-13 19:14:47 +00:00
|
|
|
subdir('intel')
|
|
|
|
endif
|
2020-12-21 22:58:47 +00:00
|
|
|
if with_microsoft_clc or with_gallium_d3d12 or with_spirv_to_dxil
|
2019-05-26 09:43:12 +01:00
|
|
|
subdir('microsoft')
|
|
|
|
endif
|
2017-09-21 04:11:32 +01:00
|
|
|
subdir('mesa')
|
2017-09-22 20:55:00 +01:00
|
|
|
subdir('loader')
|
2018-02-16 22:56:31 +00:00
|
|
|
if with_platform_haiku
|
|
|
|
subdir('hgl')
|
|
|
|
endif
|
2018-12-12 17:47:36 +00:00
|
|
|
if with_glx == 'dri'
|
2018-02-16 22:56:31 +00:00
|
|
|
subdir('glx')
|
|
|
|
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-10-18 20:20:43 +01:00
|
|
|
if with_egl
|
|
|
|
subdir('egl')
|
|
|
|
endif
|
2017-11-15 01:03:39 +00:00
|
|
|
if with_gallium
|
|
|
|
subdir('gallium')
|
2018-02-06 23:46:25 +00:00
|
|
|
# This has to be here since it requires libgallium, and subdir cannot
|
|
|
|
# contain ..
|
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
|
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,
|
2019-11-21 22:14:50 +00:00
|
|
|
variables : ['glx_tls=@0@'.format(use_elf_tls ? 'yes' : 'no')],
|
2017-11-02 23:51:40 +00:00
|
|
|
)
|
|
|
|
endif
|