2016-11-24 18:54:51 +03:00
srcs_weston = [
git_version_h ,
'main.c' ,
'text-backend.c' ,
2022-12-29 20:27:58 +03:00
'config-helpers.c' ,
2016-11-24 18:54:51 +03:00
'weston-screenshooter.c' ,
text_input_unstable_v1_server_protocol_h ,
text_input_unstable_v1_protocol_c ,
input_method_unstable_v1_server_protocol_h ,
input_method_unstable_v1_protocol_c ,
]
deps_weston = [
dep_libshared ,
2019-04-18 16:43:55 +03:00
dep_libweston_public ,
2016-11-24 18:54:51 +03:00
dep_libinput ,
weston: add more libinput config options
This is so that, for instance, people using weston as their main Wayland
compositor can invert the sense of two finger scrolling or change
pointer acceleration using weston.ini, rather than having to edit C
code.
All of the options that libinput itself exposes through its API are now
exposed in weston.ini. The new options are called `tap-and-drag`,
`tap-and-drag-lock`, `disable-while-typing`, `middle-emulation`,
`left-handed`, `rotation`, `accel-profile`, `accel-speed`,
`scroll-method`, `natural-scroll`, and `scroll-button`. I have
successfully tested everything except for `rotation`, out of a lack of
hardware support.
weston now depends directly on libevdev for turning button name strings into
kernel input codes. This was needed for the `scroll-button` config
option. (weston already depends indirectly on libevdev through
libinput, so I figured people would be OK with this.) As a practical
matter for debian-style packagers, weston now has a build dependency on
libevdev-dev.
Right now, the code applies the same options to all attached devices
that a given option is relevant for. There are plans for multiple
[libinput] sections, each with different device filters, for users who
need more control here.
Signed-off-by: Eric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
2019-02-01 05:53:25 +03:00
dep_libevdev ,
2016-11-24 18:54:51 +03:00
dep_libdl ,
dep_threads ,
]
if get_option ( 'xwayland' )
2019-02-13 17:59:59 +03:00
config_h . set ( 'BUILD_XWAYLAND' , '1' )
2016-11-24 18:54:51 +03:00
srcs_weston + = 'xwayland.c'
config_h . set_quoted ( 'XSERVER_PATH' , get_option ( 'xwayland-path' ) )
endif
2019-07-08 17:12:41 +03:00
libexec_weston = shared_library (
'exec_weston' ,
sources : srcs_weston ,
include_directories : common_inc ,
dependencies : deps_weston ,
install_dir : dir_module_weston ,
install : true ,
version : '0.0.0' ,
soversion : 0
)
dep_libexec_weston = declare_dependency (
link_with : libexec_weston ,
include_directories : [ include_directories ( '.' ) , public_inc ] ,
dependencies : dep_libweston_public
)
2016-11-24 18:54:51 +03:00
exe_weston = executable (
'weston' ,
2019-07-08 17:12:41 +03:00
'executable.c' ,
2019-04-05 17:09:28 +03:00
include_directories : common_inc ,
2019-07-08 17:12:41 +03:00
dependencies : dep_libexec_weston ,
install_rpath : dir_module_weston ,
2016-11-24 18:54:51 +03:00
install : true
)
install_headers ( 'weston.h' , subdir : 'weston' )
pkgconfig . generate (
filebase : 'weston' ,
name : 'Weston Plugin API' ,
version : version_weston ,
description : 'Header files for Weston plugin development' ,
requires_private : [ lib_weston ] ,
variables : [
'pkglibexecdir=${libexecdir}/weston'
] ,
subdirs : 'weston'
)
install_data (
'weston.desktop' ,
install_dir : join_paths ( dir_data , 'wayland-sessions' )
)
if get_option ( 'screenshare' )
srcs_screenshare = [
'screen-share.c' ,
fullscreen_shell_unstable_v1_client_protocol_h ,
fullscreen_shell_unstable_v1_protocol_c ,
]
deps_screenshare = [
2019-07-09 12:00:41 +03:00
dep_libexec_weston ,
2019-03-20 02:09:51 +03:00
dep_libshared ,
2019-04-18 16:43:55 +03:00
dep_libweston_public ,
dep_libweston_private_h , # XXX: https://gitlab.freedesktop.org/wayland/weston/issues/292
2016-11-24 18:54:51 +03:00
dep_wayland_client ,
]
plugin_screenshare = shared_library (
'screen-share' ,
srcs_screenshare ,
2019-04-05 17:09:28 +03:00
include_directories : common_inc ,
2016-11-24 18:54:51 +03:00
dependencies : deps_screenshare ,
name_prefix : '' ,
install : true ,
2020-02-05 02:40:01 +03:00
install_dir : dir_module_weston ,
install_rpath : '$ORIGIN'
2016-11-24 18:54:51 +03:00
)
env_modmap + = 'screen-share.so=@0@;' . format ( plugin_screenshare . full_path ( ) )
endif
2022-07-01 12:24:03 +03:00
if get_option ( 'deprecated-color-management-static' )
2016-11-24 18:54:51 +03:00
srcs_lcms = [
'cms-static.c' ,
'cms-helper.c' ,
]
2018-12-31 15:17:23 +03:00
if not dep_lcms2 . found ( )
2022-07-01 12:24:03 +03:00
error ( 'cms-static requires lcms2 which was not found. Or, you can use \'-Ddeprecated-color-management-static=false\'.' )
2018-12-31 15:17:23 +03:00
endif
2022-05-20 14:29:47 +03:00
config_h . set ( 'HAVE_LCMS' , '1' )
2016-11-24 18:54:51 +03:00
plugin_lcms = shared_library (
'cms-static' ,
srcs_lcms ,
2019-04-05 17:09:28 +03:00
include_directories : common_inc ,
2019-07-09 12:00:41 +03:00
dependencies : [ dep_libexec_weston , dep_libweston_public , dep_lcms2 ] ,
2016-11-24 18:54:51 +03:00
name_prefix : '' ,
install : true ,
2020-02-05 02:40:01 +03:00
install_dir : dir_module_weston ,
install_rpath : '$ORIGIN'
2016-11-24 18:54:51 +03:00
)
env_modmap + = 'cms-static.so=@0@;' . format ( plugin_lcms . full_path ( ) )
2022-07-01 12:24:03 +03:00
warning ( 'deprecated-color-management-static is enabled. This will go away, see https://gitlab.freedesktop.org/wayland/weston/-/issues/634' )
2016-11-24 18:54:51 +03:00
endif
2022-07-01 12:24:03 +03:00
if get_option ( 'deprecated-color-management-colord' )
if not get_option ( 'deprecated-color-management-static' )
error ( 'deprecated-color-management-static must be enabled to support colord. Or, you can use \'-Ddeprecated-color-management-colord=false\'.' )
2016-11-24 18:54:51 +03:00
endif
srcs_colord = [
'cms-colord.c' ,
'cms-helper.c' ,
]
2018-12-31 15:20:40 +03:00
dep_colord = dependency ( 'colord' , version : '>= 0.1.27' , required : false )
if not dep_colord . found ( )
2022-07-01 12:24:03 +03:00
error ( 'cms-colord requires colord >= 0.1.27 which was not found. Or, you can use \'-Ddeprecated-color-management-colord=false\'.' )
2018-12-31 15:20:40 +03:00
endif
2020-06-02 04:59:12 +03:00
plugin_colord_deps = [ dep_libweston_public , dep_colord , dep_lcms2 ]
2019-03-22 15:20:51 +03:00
foreach depname : [ 'glib-2.0' , 'gobject-2.0' ]
dep = dependency ( depname , required : false )
if not dep . found ( )
2022-07-01 12:24:03 +03:00
error ( 'cms-colord requires \'@0@\' which was not found. If you rather not build this, set \'-Ddeprecated-color-management-colord=false\'.' . format ( depname ) )
2019-03-22 15:20:51 +03:00
endif
plugin_colord_deps + = dep
endforeach
2016-11-24 18:54:51 +03:00
plugin_colord = shared_library (
'cms-colord' ,
srcs_colord ,
2019-04-05 17:09:28 +03:00
include_directories : common_inc ,
2019-03-22 15:20:51 +03:00
dependencies : plugin_colord_deps ,
2016-11-24 18:54:51 +03:00
name_prefix : '' ,
install : true ,
install_dir : dir_module_weston
)
env_modmap + = 'cms-colord.so=@0@;' . format ( plugin_colord . full_path ( ) )
2022-07-01 12:24:03 +03:00
warning ( 'deprecated-color-management-colord is enabled. This will go away, see https://gitlab.freedesktop.org/wayland/weston/-/issues/634' )
2016-11-24 18:54:51 +03:00
endif
if get_option ( 'systemd' )
2018-12-31 15:23:59 +03:00
dep_libsystemd = dependency ( 'libsystemd' , required : false )
if not dep_libsystemd . found ( )
error ( 'systemd-notify requires libsystemd which was not found. Or, you can use \'-Dsystemd=false\'.' )
endif
2016-11-24 18:54:51 +03:00
plugin_systemd_notify = shared_library (
'systemd-notify' ,
'systemd-notify.c' ,
2019-04-05 17:09:28 +03:00
include_directories : common_inc ,
2019-04-18 16:43:55 +03:00
dependencies : [ dep_libweston_public , dep_libsystemd ] ,
2016-11-24 18:54:51 +03:00
name_prefix : '' ,
install : true ,
install_dir : dir_module_weston
)
env_modmap + = 'systemd-notify.so=@0@;' . format ( plugin_systemd_notify . full_path ( ) )
endif
weston_ini_config = configuration_data ( )
weston_ini_config . set ( 'bindir' , dir_bin )
weston_ini_config . set ( 'libexecdir' , dir_libexec )
configure_file (
input : '../weston.ini.in' ,
output : 'weston.ini' ,
configuration : weston_ini_config
)