mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-16 19:00:58 +01:00
try meson+ninja
This commit is contained in:
71
meson.build
Normal file
71
meson.build
Normal file
@@ -0,0 +1,71 @@
|
||||
project(
|
||||
'dbtool',
|
||||
'cpp',
|
||||
version: '1.9.1',
|
||||
license: 'GPL',
|
||||
meson_version: '>=1.3',
|
||||
default_options: [
|
||||
'warning_level=2',
|
||||
'werror=true',
|
||||
],
|
||||
)
|
||||
|
||||
add_project_arguments(
|
||||
[
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-unused-result',
|
||||
'-Wno-missing-braces',
|
||||
'-Wno-format-zero-length',
|
||||
'-Wundef',
|
||||
'-Wvla',
|
||||
],
|
||||
language: 'cpp',
|
||||
)
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
prefix = get_option('prefix')
|
||||
|
||||
pcre2 = dependency('libpcre2-8')
|
||||
#gdbm = dependency('libgdbm6t64')
|
||||
#gdbm = dependency('libdb_cxx')
|
||||
|
||||
lib_berkeley = cpp.find_library('db_cxx',
|
||||
dirs : ['/usr'])
|
||||
inc_berkeley = include_directories('/usr')
|
||||
|
||||
conf = configuration_data()
|
||||
|
||||
#conf.set10('HAVE_LIBGDBM', gdbm.found())
|
||||
conf.set10('HAVE_LIBPCRE', pcre2.found())
|
||||
conf.set10('DB_CXX_HEADER', lib_berkeley.found())
|
||||
conf.set('prefix', prefix)
|
||||
|
||||
platform_h = custom_target(
|
||||
'platform_h',
|
||||
output : 'platform.h',
|
||||
command : ['./platform.sh', conf.get('HAVE_LIBPCRE'), '@OUTPUT@'],
|
||||
)
|
||||
|
||||
dbtool_sources = files(
|
||||
'cipher.cc',
|
||||
'config.cc',
|
||||
'dbtool.cc',
|
||||
'digest.cc',
|
||||
'engine.cc',
|
||||
'rijndael.cc'
|
||||
)
|
||||
|
||||
dbtool_deps = [
|
||||
pcre2
|
||||
]
|
||||
|
||||
dbtool_inc = include_directories('.')
|
||||
|
||||
executable(
|
||||
'dbtool',
|
||||
[dbtool_sources, platform_h],
|
||||
include_directories: [dbtool_inc],
|
||||
dependencies: [dbtool_deps, lib_berkeley],
|
||||
include_directories : inc_berkeley,
|
||||
install: true
|
||||
)
|
||||
3
platform.sh
Executable file
3
platform.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "$@"> platform.h
|
||||
Reference in New Issue
Block a user