[PATCH weston 2/3] build: do not link libdrm without DRM backend

Quentin Glidic sardemff7+wayland at sardemff7.net
Thu Apr 6 13:18:17 UTC 2017


On 4/6/17 2:09 PM, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> 
> The pkg-config test for LIBDRM is independent of whether the DRM backend
> is enabled or not. Therefore it is possible to have libdrm available and
> found, even though it is not needed.
> 
> Do not link libdrm.so into the launchers unless it is really needed,
> that is, DRM compositor is built. Otherwise you end up with
> fbdev-backend.so and weston-launch depending on libdrm.so.
> 
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

I would even have squashed this one to the first one, but both ways:
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

Thanks,


> ---
>   Makefile.am | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 7ee613b..ff927c1 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -219,7 +219,11 @@ libsession_helper_la_SOURCES =			\
>   	libweston/launcher-weston-launch.c	\
>   	libweston/launcher-direct.c
>   libsession_helper_la_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(PIXMAN_CFLAGS) $(COMPOSITOR_CFLAGS)
> -libsession_helper_la_LIBADD = libweston- at LIBWESTON_MAJOR@.la $(LIBDRM_LIBS)
> +libsession_helper_la_LIBADD = libweston- at LIBWESTON_MAJOR@.la
> +
> +if ENABLE_DRM_COMPOSITOR
> +libsession_helper_la_LIBADD += $(LIBDRM_LIBS)
> +endif
>   
>   if ENABLE_DBUS
>   if HAVE_SYSTEMD_LOGIN
> @@ -252,7 +256,11 @@ weston_launch_CFLAGS=				\
>   	$(PAM_CFLAGS)				\
>   	$(SYSTEMD_LOGIN_CFLAGS)			\
>   	$(LIBDRM_CFLAGS)
> -weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
> +weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS)
> +
> +if ENABLE_DRM_COMPOSITOR
> +weston_launch_LDADD += $(LIBDRM_LIBS)
> +endif
>   
>   if ENABLE_SETUID_INSTALL
>   install-exec-hook:
> 


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list