Migrate build system to Meson
FossilOrigin-Name: a27ad474c4851fba5efbb876e5c1c174de1fea165ea9c1d4d1f2018b175b5080
This commit is contained in:
parent
597a2dc711
commit
eb1d0eb207
19 changed files with 76 additions and 5971 deletions
39
meson.build
Normal file
39
meson.build
Normal file
|
@ -0,0 +1,39 @@
|
|||
project('ObjPgSQL', 'objc',
|
||||
version: '0.1',
|
||||
meson_version: '>= 1.5.0',
|
||||
default_options: {
|
||||
'warning_level': '3',
|
||||
})
|
||||
|
||||
objfw_dep = dependency('objfw')
|
||||
libpq_dep = dependency('libpq')
|
||||
|
||||
incdir = include_directories('src', 'src/exceptions')
|
||||
|
||||
subdir('src')
|
||||
subdir('tests')
|
||||
|
||||
# Meson unfortunately does not allow access to the flags of libpq_dep.
|
||||
pkgconfig = find_program('pkg-config')
|
||||
libpq_cflags = run_command(
|
||||
[pkgconfig, '--cflags', 'libpq'],
|
||||
check: true).stdout().strip()
|
||||
libpq_libs = run_command(
|
||||
[pkgconfig, '--libs', 'libpq'],
|
||||
check: true).stdout().strip()
|
||||
|
||||
objfwconfig = find_program('objfw-config')
|
||||
packages_dir = run_command(
|
||||
[objfwconfig, '--packages-dir'],
|
||||
check: true).stdout().strip()
|
||||
|
||||
configure_file(
|
||||
input: 'ObjPgSQL.oc.in',
|
||||
output: 'ObjPgSQL.oc',
|
||||
configuration: {
|
||||
'libdir': get_option('prefix') / get_option('libdir'),
|
||||
'LIBPQ_CPPFLAGS': libpq_cflags,
|
||||
'LIBPQ_LIBS': libpq_libs,
|
||||
},
|
||||
install: true,
|
||||
install_dir: packages_dir)
|
Loading…
Add table
Add a link
Reference in a new issue