mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 04:45:41 +02:00
meson: assign get_option('core-plugins-as-shared-libraries') to variable
This commit is contained in:
parent
121b2f1575
commit
08e21a4d3b
4 changed files with 10 additions and 10 deletions
|
@ -2,7 +2,7 @@ deco_sdk = declare_dependency(dependencies: [cairo, cairo_ft])
|
|||
|
||||
decorations = []
|
||||
foreach deco : ['background', 'stack', 'underline']
|
||||
if get_option('core-plugins-as-shared-libraries')
|
||||
if plugs_as_libs
|
||||
shared_module('@0@'.format(deco), '@0@.c'.format(deco),
|
||||
dependencies: deco_sdk,
|
||||
name_prefix: 'decoration_',
|
||||
|
|
|
@ -2,10 +2,11 @@ project('f00bar', 'c',
|
|||
license: 'MIT',
|
||||
default_options: ['c_std=c11', 'warning_level=1', 'werror=true'])
|
||||
|
||||
plugs_as_libs = get_option('core-plugins-as-shared-libraries')
|
||||
|
||||
add_project_arguments(
|
||||
['-D_GNU_SOURCE'] +
|
||||
(get_option('core-plugins-as-shared-libraries') ?
|
||||
['-DCORE_PLUGINS_AS_SHARED_LIBRARIES'] : []),
|
||||
(plugs_as_libs ? ['-DCORE_PLUGINS_AS_SHARED_LIBRARIES'] : []),
|
||||
language: 'c',
|
||||
)
|
||||
|
||||
|
@ -53,7 +54,7 @@ if backend_x11
|
|||
dependencies: [xcb_aux, xcb_cursor, xcb_event, xcb_ewmh, xcb_randr,
|
||||
xcb_render, cairo_xcb, xcb_errors],
|
||||
c_args: xcb_errors.found() ? '-DHAVE_XCB_ERRORS' : [],
|
||||
pic: get_option('core-plugins-as-shared-libraries'))
|
||||
pic: plugs_as_libs)
|
||||
xcb_stuff = declare_dependency(link_with: xcb_stuff_lib)
|
||||
install_headers('xcb.h', subdir: 'f00bar')
|
||||
endif
|
||||
|
|
|
@ -32,7 +32,7 @@ foreach mod, data : deps
|
|||
sources = data[0]
|
||||
dep = data[1]
|
||||
|
||||
if get_option('core-plugins-as-shared-libraries')
|
||||
if plugs_as_libs
|
||||
shared_module(mod, '@0@.c'.format(mod), sources,
|
||||
dependencies: [module_sdk] + dep,
|
||||
name_prefix: 'module_',
|
||||
|
@ -51,7 +51,7 @@ if backend_x11
|
|||
sources = data[0]
|
||||
dep = data[1]
|
||||
|
||||
if get_option('core-plugins-as-shared-libraries')
|
||||
if plugs_as_libs
|
||||
shared_module(mod, '@0@.c'.format(mod), sources,
|
||||
dependencies: [module_sdk] + dep,
|
||||
name_prefix: 'module_',
|
||||
|
|
|
@ -2,7 +2,7 @@ particle_sdk = declare_dependency(dependencies: [cairo, cairo_ft])
|
|||
|
||||
particles = []
|
||||
foreach particle : ['empty', 'list', 'map', 'progress-bar', 'ramp', 'string']
|
||||
if get_option('core-plugins-as-shared-libraries')
|
||||
if plugs_as_libs
|
||||
shared_module('@0@'.format(particle), '@0@.c'.format(particle),
|
||||
dependencies: particle_sdk,
|
||||
name_prefix: 'particle_',
|
||||
|
@ -18,10 +18,9 @@ endforeach
|
|||
|
||||
dynlist_lib = build_target(
|
||||
'dynlist', 'dynlist.c', 'dynlist.h', dependencies: particle_sdk,
|
||||
target_type: (get_option('core-plugins-as-shared-libraries')
|
||||
? 'shared_library' : 'static_library'),
|
||||
target_type: plugs_as_libs ? 'shared_library' : 'static_library',
|
||||
override_options : ['b_lundef=false'],
|
||||
install: get_option('core-plugins-as-shared-libraries'),
|
||||
install: plugs_as_libs,
|
||||
install_dir: get_option('libdir') + '/f00bar',
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue