From 6bc50b12f8ffabe7fbe652693c9909dd1dcad1f1 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 5 Apr 2019 12:28:14 +0300 Subject: [PATCH] build: make backlight a helper lib Right now only used by the DRM-backend, but there is a test program that should use this as well. This helps with building the test program and moving DRM-backend into a subdirectory. Signed-off-by: Pekka Paalanen --- libweston/meson.build | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/libweston/meson.build b/libweston/meson.build index a7a8105e..e3957147 100644 --- a/libweston/meson.build +++ b/libweston/meson.build @@ -185,13 +185,27 @@ dep_libinput_backend = declare_dependency( include_directories: include_directories('.') ) - if get_option('backend-drm') config_h.set('BUILD_DRM_COMPOSITOR', '1') + lib_backlight = static_library( + 'backlight', + 'libbacklight.c', + dependencies: [ + dep_libdrm_headers, + dependency('libudev') + ], + include_directories: include_directories('..'), + install: false, + build_by_default: false + ) + dep_backlight = declare_dependency( + link_with: lib_backlight, + include_directories: include_directories('.') + ) + srcs_drm = [ 'compositor-drm.c', - 'libbacklight.c', linux_dmabuf_unstable_v1_protocol_c, linux_dmabuf_unstable_v1_server_protocol_h, presentation_time_server_protocol_h, @@ -203,6 +217,7 @@ if get_option('backend-drm') dep_libdrm, dep_libinput_backend, dependency('libudev', version: '>= 136'), + dep_backlight ] # XXX: Actually let DRM-backend build without GBM, it really should