Path: blob/21.2-virgl/src/gallium/targets/libgl-gdi/meson.build
4565 views
# Copyright © 2018 Intel Corporation12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.192021opengl32_link_args = []22if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64'23opengl32_link_args += ['-Wl,--enable-stdcall-fixup']24endif2526ogldef = files('../../frontends/wgl/opengl32.def')[0]2728libopengl32 = shared_library(29'opengl32',30['libgl_gdi.c'],31vs_module_defs : ogldef,32include_directories : [33inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_wgl, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers,34],35link_whole : [libwgl],36link_with : [37libgallium, libglsl, libmesa_gallium, libwsgdi, libglapi_static, libglapi38],39dependencies : [40dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, driver_swr,41driver_d3d12, driver_zink, winsys_d3d12_wgl42],43link_args : opengl32_link_args,44name_prefix : '', # otherwise mingw will create libopengl32.dll45install : true,46)4748if with_tests49extra_test_defs = []5051# The generated MinGW 32-bits import libraries are always broken due to missing @nn suffix on52# symbols, no matter what we do. So instead we use the builtin libopengl32.a53extra_test_deps = [cpp.find_library('opengl32')]5455if with_gallium_d3d1256extra_test_defs += ['-DGALLIUM_D3D12']57extra_test_deps += [cpp.find_library('d3d12')]58endif5960test_wgl = executable(61'test_wgl',62files('tests/wgl_tests.cpp'),63cpp_args : [cpp_msvc_compat_args, extra_test_defs],64dependencies : [idep_gtest, dep_dxheaders, extra_test_deps],65)6667# The CI pipeline for MinGW doesn't support creating a window, so don't run these tests there68if with_tests and cc.get_id() != 'gcc'69test(70'wgl',71test_wgl,72suite : ['wgl'],73depends : [libopengl32],74)75endif76endif777879