Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/gallium/targets/libgl-gdi/meson.build
4565 views
1
# Copyright © 2018 Intel Corporation
2
3
# Permission is hereby granted, free of charge, to any person obtaining a copy
4
# of this software and associated documentation files (the "Software"), to deal
5
# in the Software without restriction, including without limitation the rights
6
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
# copies of the Software, and to permit persons to whom the Software is
8
# furnished to do so, subject to the following conditions:
9
10
# The above copyright notice and this permission notice shall be included in
11
# all copies or substantial portions of the Software.
12
13
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
# SOFTWARE.
20
21
22
opengl32_link_args = []
23
if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64'
24
opengl32_link_args += ['-Wl,--enable-stdcall-fixup']
25
endif
26
27
ogldef = files('../../frontends/wgl/opengl32.def')[0]
28
29
libopengl32 = shared_library(
30
'opengl32',
31
['libgl_gdi.c'],
32
vs_module_defs : ogldef,
33
include_directories : [
34
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_wgl, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers,
35
],
36
link_whole : [libwgl],
37
link_with : [
38
libgallium, libglsl, libmesa_gallium, libwsgdi, libglapi_static, libglapi
39
],
40
dependencies : [
41
dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, driver_swr,
42
driver_d3d12, driver_zink, winsys_d3d12_wgl
43
],
44
link_args : opengl32_link_args,
45
name_prefix : '', # otherwise mingw will create libopengl32.dll
46
install : true,
47
)
48
49
if with_tests
50
extra_test_defs = []
51
52
# The generated MinGW 32-bits import libraries are always broken due to missing @nn suffix on
53
# symbols, no matter what we do. So instead we use the builtin libopengl32.a
54
extra_test_deps = [cpp.find_library('opengl32')]
55
56
if with_gallium_d3d12
57
extra_test_defs += ['-DGALLIUM_D3D12']
58
extra_test_deps += [cpp.find_library('d3d12')]
59
endif
60
61
test_wgl = executable(
62
'test_wgl',
63
files('tests/wgl_tests.cpp'),
64
cpp_args : [cpp_msvc_compat_args, extra_test_defs],
65
dependencies : [idep_gtest, dep_dxheaders, extra_test_deps],
66
)
67
68
# The CI pipeline for MinGW doesn't support creating a window, so don't run these tests there
69
if with_tests and cc.get_id() != 'gcc'
70
test(
71
'wgl',
72
test_wgl,
73
suite : ['wgl'],
74
depends : [libopengl32],
75
)
76
endif
77
endif
78
79