meson.build: do not leak CPP macros to subprojects

This commit is contained in:
Max Kellermann 2023-12-20 17:40:47 +01:00
parent a52292ae17
commit 2c851498cc
1 changed files with 9 additions and 3 deletions

View File

@ -109,10 +109,13 @@ configure_file(output: 'Version.h', configuration: version_conf)
conf = configuration_data() conf = configuration_data()
conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf')) conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
common_cppflags = [ common_global_cppflags = [
'-D_GNU_SOURCE', '-D_GNU_SOURCE',
] ]
common_cppflags = [
]
test_global_common_flags = [ test_global_common_flags = [
'-fvisibility=hidden', '-fvisibility=hidden',
] ]
@ -259,8 +262,11 @@ if is_android
subdir('android') subdir('android')
endif endif
add_global_arguments(common_cppflags, language: 'c') add_global_arguments(common_global_cppflags, language: 'c')
add_global_arguments(common_cppflags, language: 'cpp') add_global_arguments(common_global_cppflags, language: 'cpp')
add_project_arguments(common_cppflags, language: 'c')
add_project_arguments(common_cppflags, language: 'cpp')
enable_daemon = not is_windows and not is_android and get_option('daemon') enable_daemon = not is_windows and not is_android and get_option('daemon')
conf.set('ENABLE_DAEMON', enable_daemon) conf.set('ENABLE_DAEMON', enable_daemon)