DynLoad is a cross-platform system for dynamically loading arbitrary libraries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
982 B

project('dynload', 'c', default_options : ['default_library=static', 'c_std=c99'])
add_project_arguments(['-Werror', '-Wall', '-Wpedantic', '-Wextra'], language : 'c')
incdir = include_directories('include')
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDYNLOAD_DEBUG', language : 'c')
cc = meson.get_compiler('c')
depdlfcn = cc.find_library('dl', required:false)
#depdlfcn = dependency(ldl, required:false)
libdynload = library('dynload', 'src/dynload.c', include_directories : incdir, dependencies: depdlfcn)
dynload_dep = declare_dependency(link_with : libdynload, include_directories : incdir)
if not (meson.is_cross_build() or meson.is_subproject())
libsdf = library('sdf', 'src/gen/SdfParser.c', include_directories : incdir)
depsdf = declare_dependency(link_with : libsdf, include_directories : incdir)
executable('dynloadgen', 'src/gen/gen.c', include_directories : incdir, dependencies: depsdf)