meson.build: separate option for only installing xorg sdk

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-12 19:59:46 +01:00
committed by Enrico Weigelt
parent 7dad061eab
commit eb6b201c23
3 changed files with 12 additions and 3 deletions

View File

@@ -410,7 +410,7 @@ if with_dtrace
dtrace_hdr += dtrace_header.process(dtrace_tmpl) dtrace_hdr += dtrace_header.process(dtrace_tmpl)
endif endif
if build_xorg if build_xorg_sdk
install_data( install_data(
[ [
'Xprintf.h', 'Xprintf.h',

View File

@@ -236,6 +236,8 @@ if with_dtrace
dtrace = find_program('dtrace', required: true) dtrace = find_program('dtrace', required: true)
endif endif
build_xorg_sdk = get_option('xorg-sdk')
build_xorg = false build_xorg = false
if (host_machine.system() != 'windows') if (host_machine.system() != 'windows')
if get_option('xorg') == 'auto' if get_option('xorg') == 'auto'
@@ -245,6 +247,11 @@ if (host_machine.system() != 'windows')
build_xorg = get_option('xorg') == 'true' build_xorg = get_option('xorg') == 'true'
endif endif
endif endif
if build_xorg
build_xorg_sdk = true
endif
xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg') xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg')
libxcvt_dep = dependency('libxcvt', fallback: ['libxcvt', 'libxcvt_dep'], required: build_xorg) libxcvt_dep = dependency('libxcvt', fallback: ['libxcvt', 'libxcvt_dep'], required: build_xorg)
@@ -937,14 +944,14 @@ configure_file(output : 'dix-config.h',
configure_file(output : 'xorg-server.h', configure_file(output : 'xorg-server.h',
input : 'hw/xfree86/xlibre-server.h.meson.in', input : 'hw/xfree86/xlibre-server.h.meson.in',
configuration : conf_data, configuration : conf_data,
install: build_xorg, install: build_xorg_sdk,
install_dir: xorgsdkdir) install_dir: xorgsdkdir)
# new config include file for drivers # new config include file for drivers
configure_file(output : 'xlibre-server.h', configure_file(output : 'xlibre-server.h',
input : 'hw/xfree86/xlibre-server.h.meson.in', input : 'hw/xfree86/xlibre-server.h.meson.in',
configuration : conf_data, configuration : conf_data,
install: build_xorg, install: build_xorg_sdk,
install_dir: xorgsdkdir) install_dir: xorgsdkdir)
configure_file(output : 'xorg-config.h', configure_file(output : 'xorg-config.h',

View File

@@ -1,5 +1,7 @@
option('xorg', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', option('xorg', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'Enable Xorg X Server') description: 'Enable Xorg X Server')
option('xorg-sdk', type: 'boolean', value: 'false',
description: 'Enable Xorg X Server SDK (enabled with xorg)')
option('xephyr', type: 'boolean', value: false, option('xephyr', type: 'boolean', value: false,
description: 'Enable Xephyr nested X server') description: 'Enable Xephyr nested X server')
option('xfbdev', type: 'boolean', value: false, option('xfbdev', type: 'boolean', value: false,