mirror of https://gitlab.freedesktop.org/mesa/mesa
util: Define WITH_XMLCONFIG from Meson
This will allow us to disable runtime xmlconfig even outside of Windows/Android. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
This commit is contained in:
parent
fc6bb13945
commit
fb0a4a5d6c
|
@ -288,7 +288,10 @@ idep_mesautil = declare_dependency(
|
|||
|
||||
xmlconfig_deps = []
|
||||
if not (with_platform_android or with_platform_windows)
|
||||
c_xmlconfig_arg = '-DWITH_XMLCONFIG=1'
|
||||
xmlconfig_deps += dep_expat
|
||||
else
|
||||
c_xmlconfig_arg = '-DWITH_XMLCONFIG=0'
|
||||
endif
|
||||
xmlconfig_deps += dep_regex
|
||||
|
||||
|
@ -299,6 +302,7 @@ _libxmlconfig = static_library(
|
|||
dependencies : [idep_mesautil, dep_m, xmlconfig_deps],
|
||||
c_args : [
|
||||
c_msvc_compat_args,
|
||||
c_xmlconfig_arg,
|
||||
'-DSYSCONFDIR="@0@"'.format(
|
||||
join_paths(get_option('prefix'), get_option('sysconfdir'))
|
||||
),
|
||||
|
@ -328,7 +332,7 @@ if with_tests
|
|||
include_directories : [inc_include, inc_src],
|
||||
dependencies : [idep_mesautil, idep_xmlconfig, idep_gtest],
|
||||
override_options : ['cpp_std=c++2a'],
|
||||
cpp_args: ['-Wno-write-strings']
|
||||
cpp_args: ['-Wno-write-strings', c_xmlconfig_arg]
|
||||
),
|
||||
suite : ['util'],
|
||||
env: ['HOME=' + join_paths(meson.current_source_dir(),
|
||||
|
|
|
@ -39,12 +39,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID) || defined(_WIN32)
|
||||
#define WITH_XMLCONFIG 0
|
||||
#else
|
||||
#define WITH_XMLCONFIG 1
|
||||
#endif
|
||||
|
||||
#define STRING_CONF_MAXLEN 1024
|
||||
|
||||
/** \brief Option data types */
|
||||
|
|
Loading…
Reference in New Issue