meson: fix compositor build with xwayland disabled
If xwayland is disabled, compositor/weston is built without compositor/xwayland.c, which defines wet_load_xwayland. compositor/fb12c4d@@weston@exe/main.c.o: In function `main': ../weston-5.0.0-169-g2d4cc4f4dd6a/compositor/main.c:3103: undefined reference to `wet_load_xwayland' Provide an empty stub for wet_load_xwayland if xwayland is disabled. With that we also have to remove xwayland.c from the autotools build if xwayland is disabled, to avoid a multiple definition error. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
committed by
Philipp Zabel
parent
cca7346557
commit
b68847a8bc
+4
-1
@@ -210,8 +210,11 @@ weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
|
|||||||
weston_SOURCES = \
|
weston_SOURCES = \
|
||||||
compositor/main.c \
|
compositor/main.c \
|
||||||
compositor/weston-screenshooter.c \
|
compositor/weston-screenshooter.c \
|
||||||
compositor/text-backend.c \
|
compositor/text-backend.c
|
||||||
|
if ENABLE_XWAYLAND
|
||||||
|
weston_SOURCES += \
|
||||||
compositor/xwayland.c
|
compositor/xwayland.c
|
||||||
|
endif
|
||||||
|
|
||||||
# Track this dependency explicitly instead of using BUILT_SOURCES. We
|
# Track this dependency explicitly instead of using BUILT_SOURCES. We
|
||||||
# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
|
# add BUILT_SOURCES to CLEANFILES, but we want to keep git-version.h
|
||||||
|
|||||||
@@ -646,7 +646,9 @@ usage(int error_code)
|
|||||||
" --shell=MODULE\tShell module, defaults to desktop-shell.so\n"
|
" --shell=MODULE\tShell module, defaults to desktop-shell.so\n"
|
||||||
" -S, --socket=NAME\tName of socket to listen on\n"
|
" -S, --socket=NAME\tName of socket to listen on\n"
|
||||||
" -i, --idle-time=SECS\tIdle time in seconds\n"
|
" -i, --idle-time=SECS\tIdle time in seconds\n"
|
||||||
|
#if defined(BUILD_XWAYLAND)
|
||||||
" --xwayland\t\tLoad the xwayland module\n"
|
" --xwayland\t\tLoad the xwayland module\n"
|
||||||
|
#endif
|
||||||
" --modules\t\tLoad the comma-separated list of modules\n"
|
" --modules\t\tLoad the comma-separated list of modules\n"
|
||||||
" --log=FILE\t\tLog to the given file\n"
|
" --log=FILE\t\tLog to the given file\n"
|
||||||
" -c, --config=FILE\tConfig file to load, defaults to weston.ini\n"
|
" -c, --config=FILE\tConfig file to load, defaults to weston.ini\n"
|
||||||
@@ -2876,6 +2878,14 @@ copy_command_line(int argc, char * const argv[])
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(BUILD_XWAYLAND)
|
||||||
|
int
|
||||||
|
wet_load_xwayland(struct weston_compositor *comp)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ret = EXIT_FAILURE;
|
int ret = EXIT_FAILURE;
|
||||||
@@ -2916,7 +2926,9 @@ int main(int argc, char *argv[])
|
|||||||
{ WESTON_OPTION_STRING, "shell", 0, &shell },
|
{ WESTON_OPTION_STRING, "shell", 0, &shell },
|
||||||
{ WESTON_OPTION_STRING, "socket", 'S', &socket_name },
|
{ WESTON_OPTION_STRING, "socket", 'S', &socket_name },
|
||||||
{ WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time },
|
{ WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time },
|
||||||
|
#if defined(BUILD_XWAYLAND)
|
||||||
{ WESTON_OPTION_BOOLEAN, "xwayland", 0, &xwayland },
|
{ WESTON_OPTION_BOOLEAN, "xwayland", 0, &xwayland },
|
||||||
|
#endif
|
||||||
{ WESTON_OPTION_STRING, "modules", 0, &option_modules },
|
{ WESTON_OPTION_STRING, "modules", 0, &option_modules },
|
||||||
{ WESTON_OPTION_STRING, "log", 0, &log },
|
{ WESTON_OPTION_STRING, "log", 0, &log },
|
||||||
{ WESTON_OPTION_BOOLEAN, "help", 'h', &help },
|
{ WESTON_OPTION_BOOLEAN, "help", 'h', &help },
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ deps_weston = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
if get_option('xwayland')
|
if get_option('xwayland')
|
||||||
|
config_h.set('BUILD_XWAYLAND', '1')
|
||||||
|
|
||||||
srcs_weston += 'xwayland.c'
|
srcs_weston += 'xwayland.c'
|
||||||
config_h.set_quoted('XSERVER_PATH', get_option('xwayland-path'))
|
config_h.set_quoted('XSERVER_PATH', get_option('xwayland-path'))
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user