mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-02-04 06:00:30 +01:00
meson.build: install our headers into a versioned subfolder
This makes it possible to have multiple (incompatible) versions installed simultaneously. Any incompatible version requires us bumping the major version, so our headers are simply installed into the hardcoded libei-1.0 subdir. This also changes the pkgconfig names to include the API version, so it's now `pkgconfig --cflags libei-1.0`.
This commit is contained in:
parent
a7f9712d83
commit
40ba30da82
3 changed files with 16 additions and 8 deletions
|
|
@ -71,8 +71,8 @@ Otherwise, the most rudimentary way to compile and link a program against
|
|||
libei or libeis is:
|
||||
|
||||
@verbatim
|
||||
gcc -o myprogram mylibeiclient.c `pkg-config --cflags --libs libei`
|
||||
gcc -o myprogram myEISimplementation.c `pkg-config --cflags --libs libeis`
|
||||
gcc -o myprogram mylibeiclient.c `pkg-config --cflags --libs libei-1.0`
|
||||
gcc -o myprogram myEISimplementation.c `pkg-config --cflags --libs libeis-1.0`
|
||||
@endverbatim
|
||||
|
||||
For further information on using pkgconfig see the pkg-config documentation.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ cflags =[
|
|||
'-Wswitch',
|
||||
]
|
||||
|
||||
# Our headers are in libei-1.0 until we hit 2.0 etc. libei's API is
|
||||
# backwards-compatible until the major version bump.
|
||||
libei_api_version = '1.0'
|
||||
libei_api_dir = 'libei-@0@'.format(libei_api_version)
|
||||
|
||||
if cc.get_id() == 'clang'
|
||||
cflags += [
|
||||
# clang doesn't think just using _unref_ is a use of the variable
|
||||
|
|
|
|||
|
|
@ -68,16 +68,17 @@ lib_libei = library('ei',
|
|||
install: true
|
||||
)
|
||||
libei_headers = files('libei.h')
|
||||
install_headers(libei_headers)
|
||||
install_headers(libei_headers, subdir: libei_api_dir)
|
||||
|
||||
dep_libei = declare_dependency(link_with: lib_libei,
|
||||
include_directories: [inc_src])
|
||||
meson.override_dependency('libei', dep_libei)
|
||||
|
||||
pkgconfig.generate(lib_libei,
|
||||
filebase: 'libei',
|
||||
filebase: 'libei-@0@'.format(libei_api_version),
|
||||
name: 'libEI',
|
||||
description: 'Emulated Input client library',
|
||||
subdirs: libei_api_dir,
|
||||
version: meson.project_version(),
|
||||
libraries: lib_libei,
|
||||
)
|
||||
|
|
@ -123,16 +124,17 @@ lib_libeis = library('eis',
|
|||
install: true
|
||||
)
|
||||
libeis_headers = files('libeis.h')
|
||||
install_headers(libeis_headers)
|
||||
install_headers(libeis_headers, subdir: libei_api_dir)
|
||||
|
||||
dep_libeis = declare_dependency(link_with: lib_libeis,
|
||||
include_directories: [inc_src])
|
||||
meson.override_dependency('libeis', dep_libeis)
|
||||
|
||||
pkgconfig.generate(lib_libeis,
|
||||
filebase: 'libeis',
|
||||
filebase: 'libeis-@0@'.format(libei_api_version),
|
||||
name: 'libEIS',
|
||||
description: 'Emulated Input server library',
|
||||
subdirs: libei_api_dir,
|
||||
version: meson.project_version(),
|
||||
libraries: lib_libeis,
|
||||
)
|
||||
|
|
@ -150,16 +152,17 @@ if build_oeffis
|
|||
install: true
|
||||
)
|
||||
liboeffis_headers = files('liboeffis.h')
|
||||
install_headers(liboeffis_headers)
|
||||
install_headers(liboeffis_headers, subdir: libei_api_dir)
|
||||
|
||||
dep_liboeffis = declare_dependency(link_with: lib_liboeffis,
|
||||
include_directories: [inc_src])
|
||||
meson.override_dependency('liboeffis', dep_liboeffis)
|
||||
|
||||
pkgconfig.generate(lib_liboeffis,
|
||||
filebase: 'liboeffis',
|
||||
filebase: 'liboeffis-@0@'.format(libei_api_version),
|
||||
name: 'libOeffis',
|
||||
description: 'RemoteDesktop portal DBus helper library',
|
||||
subdirs: libei_api_dir,
|
||||
version: meson.project_version(),
|
||||
libraries: lib_liboeffis,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue