build: make libinput-backend a helper lib
Rather than having fbdev and drm backends include the libinput files ad hoc, wrap them in a static library. Using the dependency object for that helper library will then automatically pull in any necerray include dirs for the users. This helps with moving the backends into subdirectories. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
4e53814180
commit
b40e051858
|
@ -166,14 +166,32 @@ lib_session_helper = static_library(
|
||||||
dep_session_helper = declare_dependency(link_with: lib_session_helper)
|
dep_session_helper = declare_dependency(link_with: lib_session_helper)
|
||||||
|
|
||||||
|
|
||||||
|
lib_libinput_backend = static_library(
|
||||||
|
'libinput-backend',
|
||||||
|
[
|
||||||
|
'libinput-device.c',
|
||||||
|
'libinput-seat.c'
|
||||||
|
],
|
||||||
|
dependencies: [
|
||||||
|
dep_libweston,
|
||||||
|
dep_libinput,
|
||||||
|
dependency('libudev', version: '>= 136')
|
||||||
|
],
|
||||||
|
include_directories: include_directories('..'),
|
||||||
|
install: false
|
||||||
|
)
|
||||||
|
dep_libinput_backend = declare_dependency(
|
||||||
|
link_with: lib_libinput_backend,
|
||||||
|
include_directories: include_directories('.')
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if get_option('backend-drm')
|
if get_option('backend-drm')
|
||||||
config_h.set('BUILD_DRM_COMPOSITOR', '1')
|
config_h.set('BUILD_DRM_COMPOSITOR', '1')
|
||||||
|
|
||||||
srcs_drm = [
|
srcs_drm = [
|
||||||
'compositor-drm.c',
|
'compositor-drm.c',
|
||||||
'libbacklight.c',
|
'libbacklight.c',
|
||||||
'libinput-device.c',
|
|
||||||
'libinput-seat.c',
|
|
||||||
linux_dmabuf_unstable_v1_protocol_c,
|
linux_dmabuf_unstable_v1_protocol_c,
|
||||||
linux_dmabuf_unstable_v1_server_protocol_h,
|
linux_dmabuf_unstable_v1_server_protocol_h,
|
||||||
presentation_time_server_protocol_h,
|
presentation_time_server_protocol_h,
|
||||||
|
@ -183,7 +201,7 @@ if get_option('backend-drm')
|
||||||
dep_libweston,
|
dep_libweston,
|
||||||
dep_session_helper,
|
dep_session_helper,
|
||||||
dep_libdrm,
|
dep_libdrm,
|
||||||
dep_libinput,
|
dep_libinput_backend,
|
||||||
dependency('libudev', version: '>= 136'),
|
dependency('libudev', version: '>= 136'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -406,15 +424,13 @@ if get_option('backend-fbdev')
|
||||||
|
|
||||||
srcs_fbdev = [
|
srcs_fbdev = [
|
||||||
'compositor-fbdev.c',
|
'compositor-fbdev.c',
|
||||||
'libinput-device.c',
|
|
||||||
'libinput-seat.c',
|
|
||||||
presentation_time_server_protocol_h,
|
presentation_time_server_protocol_h,
|
||||||
]
|
]
|
||||||
|
|
||||||
deps_fbdev = [
|
deps_fbdev = [
|
||||||
dep_libweston,
|
dep_libweston,
|
||||||
dep_session_helper,
|
dep_session_helper,
|
||||||
dep_libinput,
|
dep_libinput_backend,
|
||||||
dependency('libudev', version: '>= 136'),
|
dependency('libudev', version: '>= 136'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue