mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
meson: Expose library build type as global variables
Given that it can be computed using an error-prone strings comparisons it is better to provide a variable everywhere, so that we don't have the risk of comparing values that are always false.
This commit is contained in:
@@ -39,7 +39,7 @@ gdbus_example_objectmanager_rst_gen = custom_target('objectmanager-rst-gen',
|
||||
)
|
||||
|
||||
extra_c_args = []
|
||||
if get_option('default_library') == 'static'
|
||||
if glib_build_static_only
|
||||
extra_c_args = '-DGDBUS_OBJECT_MANAGER_EXAMPLE_STATIC_COMPILATION'
|
||||
endif
|
||||
|
||||
|
@@ -223,7 +223,7 @@ if host_machine.system() != 'windows'
|
||||
}
|
||||
|
||||
# LD_PRELOAD modules don't work so well with AddressSanitizer
|
||||
if have_rtld_next and get_option('default_library') != 'static' and get_option('b_sanitize') == 'none'
|
||||
if have_rtld_next and glib_build_shared and get_option('b_sanitize') == 'none'
|
||||
gio_tests += {
|
||||
'gsocketclient-slow' : {
|
||||
'depends' : [
|
||||
@@ -652,7 +652,7 @@ if meson.can_run_host_binaries()
|
||||
|
||||
compiler_type = '--compiler=@0@'.format(cc.get_id())
|
||||
|
||||
if get_option('default_library') != 'static'
|
||||
if glib_build_shared
|
||||
plugin_resources_c = custom_target('plugin-resources.c',
|
||||
input : 'test4.gresource.xml',
|
||||
output : 'plugin-resources.c',
|
||||
@@ -983,6 +983,6 @@ endif
|
||||
|
||||
subdir('services')
|
||||
|
||||
if get_option('default_library') != 'static'
|
||||
if glib_build_shared
|
||||
subdir('modules')
|
||||
endif
|
||||
|
Reference in New Issue
Block a user