meson: inline `inc_common`
[mesa.git] / src / gallium / targets / libgl-gdi / meson.build
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 # DEF parser in certain versions of MinGW is busted, as does not behave as
22 # MSVC. mingw-w64 works fine.
23 if cc.get_id() == 'gcc' and host_machine.cpu_family() != 'x86_64'
24 ogldef = files('../../state_trackers/wgl/opengl32.mingw.def')[0]
25 else
26 ogldef = files('../../state_trackers/wgl/opengl32.def')[0]
27 endif
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_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 ],
43 name_prefix : '', # otherwise mingw will create libopengl32.dll
44 install : true,
45 )