[PATCH weston v2 7/8] Split the modules and include files between weston and libweston

Quentin Glidic sardemff7+wayland at sardemff7.net
Thu Jun 2 09:06:58 UTC 2016


On 01/06/2016 20:43, Giulio Camuffo wrote:
> The backends are now installed in lib/libweston-0, and the include
> files that will be used by libweston in include/libweston-0. The other
> modules and weston-specific include files are kept in the old paths.
> A new load_weston_module() is added to load plugins in the old path,
> which is not part of libweston, but weston only and defined in main.c.
> To allow that to be used by out of tree weston plugins, the function
> is declared in a new weston.h, installed in include/weston.
>
> The -0 in the paths is the abi version of libweston, and it will be
> used by the libweston .so too. When the abi change the number will
> be increased.
>
> Signed-off-by: Giulio Camuffo <giuliocamuffo at gmail.com>
> ---
>

Oops, forgot to put two comments on this one. But I maintain my Rb with 
those fixed.


>
> v2: - don't remove MODULEDIR
>     - keep systemd-notify with the main.c side
>     - rename the new load function to load_weston_plugin
>
>  Makefile.am            | 24 +++++++++++++++---------
>  configure.ac           |  2 ++
>  ivi-shell/ivi-layout.c |  3 ++-
>  src/compositor.c       |  2 +-
>  src/main.c             | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
>  src/weston.h           |  3 +++
>  src/weston.pc.in       |  2 +-
>  7 files changed, 70 insertions(+), 13 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 2f81ec0..e90b3ba 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> [snip]
> @@ -213,8 +216,8 @@ pkgconfig_DATA = src/weston.pc
>  wayland_sessiondir = $(datadir)/wayland-sessions
>  dist_wayland_session_DATA = src/weston.desktop
>
> -westonincludedir = $(includedir)/weston
> -westoninclude_HEADERS =				\
> +libwestonincludedir = $(includedir)/libweston-${LIBWESTON_ABI_VERSION}
> +libwestoninclude_HEADERS =				\
>  	src/version.h				\
>  	src/compositor.h			\
>  	src/compositor-drm.h			\
> @@ -229,13 +232,16 @@ westoninclude_HEADERS =				\
>  	shared/zalloc.h				\
>  	shared/platform.h
>
> +westonincludedir = $(includedir)/weston
> +westoninclude_HEADERS = src/weston.h
> +

You are installing weston.h here, but it should be done in the creation 
patch. So this patch should include a line removing weston.h from the 
previous list (the now-libweston list).


> [snip]
> diff --git a/src/weston.pc.in b/src/weston.pc.in
> index c560eb3..f2ffc9e 100644
> --- a/src/weston.pc.in
> +++ b/src/weston.pc.in
> @@ -9,4 +9,4 @@ Name: Weston Plugin API
>  Description: Header files for Weston plugin development
>  Version: @WESTON_VERSION@
>  Requires.private: wayland-server pixman-1 xkbcommon
> -Cflags: -I${includedir}
> +Cflags: -I${includedir}/weston -I{includedir}/libweston- at LIBWESTON_ABI_VERSION@
>

So weston.h is not in a different directory than compositor.h. You must 
change the #include to use <>.

-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list