wayland/egl/meson.build
Derek Foreman 21025f6975 libs: Don't allow static libraries to be built
Static libraries have no namespacing, so our "private" symbols become
global. This results in functions like os_create_anonymous_file() crashing
into functions of the same name in multiple projects.

Since our test suite fails for static builds already, it's probably a clear
indication that they're not well tested - so let's just force everything to
be shared instead of trying to fix up static support.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-03-11 07:18:15 -05:00

55 lines
1.2 KiB
Meson

wayland_egl = shared_library(
'wayland-egl',
sources: [
'wayland-egl.c',
wayland_client_protocol_h
],
include_directories: src_inc,
version: meson.project_version(),
install: true
)
if get_option('tests')
wayland_egl_abi_check = executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c')
test('wayland-egl abi check', wayland_egl_abi_check)
nm_path = find_program(['llvm-nm', 'nm']).full_path()
test(
'wayland-egl symbols check',
find_program('wayland-egl-symbols-check'),
env: [
'WAYLAND_EGL_LIB=@0@'.format(wayland_egl.full_path()),
'NM=@0@'.format(nm_path)
]
)
endif
install_headers([
'wayland-egl.h',
'wayland-egl-core.h',
'wayland-egl-backend.h'
])
pkgconfig.generate(
name: 'wayland-egl',
description: 'Frontend wayland-egl library',
version: '18.1.0',
requires: 'wayland-client',
libraries: wayland_egl
)
pkgconfig.generate(
name: 'wayland-egl-backend',
description: 'Backend wayland-egl interface',
version: '3'
)
wayland_egl_dep = declare_dependency(
link_with: wayland_egl,
include_directories: [ root_inc, include_directories('.') ],
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('wayland-egl', wayland_egl_dep)
endif