rizin/librz/flag/meson.build
Florian Märkl 4e5857cacf
Meson refactor: collect modules in dict and centralize config (#2945)
Duplicated code for pkg-config and cmake configuration is avoided by
letting every rizin module register itself in a global dictionary
called "modules" which is then iterated in one place to perform any
shared logic, inspired by how qemu handles multiple targets in its meson
build system.

This is an almost pure refactor, so the resulting .pc/.cmake files
should be identical with the following exceptions:
- rz_reg.pc does not have plugindir anymore as rz_reg has no plugins.
- Some other modules have their dependencies in .pc files altered to be
  consistent with cmake.
2022-08-20 19:59:27 +02:00

31 lines
683 B
Meson

rz_flag_sources = [
'flag.c',
'tags.c',
'zones.c',
'serialize_flag.c'
]
rz_flag = library('rz_flag', rz_flag_sources,
include_directories: [platform_inc],
dependencies: [
rz_util_dep
],
install: true,
implicit_include_directories: false,
install_rpath: rpath_lib,
soversion: rizin_libversion,
version: rizin_version,
name_suffix: lib_name_suffix,
name_prefix: lib_name_prefix,
)
rz_flag_dep = declare_dependency(link_with: rz_flag,
include_directories: [platform_inc])
meson.override_dependency('rz_flag', rz_flag_dep)
modules += { 'rz_flag': {
'target': rz_flag,
'dependencies': ['rz_util']
}}
subdir('d')