1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 18:29:19 +02:00
deltachat-core/meson.build
Floris Bruynooghe 702b3ccc49 Use bundeled libetpan by default
Using the system-libetpan causes pain to people who have out-dated
library versions, additionally it is nice to by default create a
library which uses dependencies as close as possible to the android
version for testing purposes.  This makes sure that the bundeled
sub-projects are used by default.

Additionally it makes sure to not install these bundeled dependencies
and only statically link the libdeltachat.so against them.  This is
beneficial to not conflict with any system-installed versions of these
libraries, especially since some bundled libraries are stripped down
and would not provide indirect users of the library the full library
functionality.

It does still provide an option to use the system-provided libetpan if
desired however, this makes sure libdeltachat plays nice with normal
package managers etc.
2018-06-10 19:52:54 +02:00

59 lines
1.6 KiB
Meson

project(
'deltachat-core', 'c',
license: 'GPLv3',
subproject_dir: 'libs',
)
# These get their information from pkg-config.
pthreads = dependency('threads')
zlib = dependency('zlib')
openssl = dependency('openssl')
sasl = dependency('libsasl2')
sqlite = dependency('sqlite3')
# Optionally use the system libetpan
if get_option('system-etpan')
# Sadly libetpan doesn't use pkg-config.
etpan_prefix = run_command('libetpan-config', ['--prefix']).stdout().strip()
etpan_cflags = run_command('libetpan-config', ['--cflags']).stdout().strip().split()
etpan_libs = run_command('libetpan-config', ['--libs']).stdout().strip().split()
etpan_inc_dir = join_paths(etpan_prefix, 'include')
etpan_inc = include_directories(etpan_inc_dir)
etpan = declare_dependency(
compile_args: etpan_cflags,
include_directories: etpan_inc,
link_args: etpan_libs,
)
else
etpan_proj = subproject('libetpan')
etpan = etpan_proj.get_variable('dep')
endif
# Build bundled dependencies.
netpgp_proj = subproject('netpgp')
netpgp = netpgp_proj.get_variable('dep')
# Build the library, stored in lib`.
subdir('src')
# Build the binaries.
subdir('cmdline')
version = run_command('git', 'describe', '--tags')
if version.returncode() != 0
message('git version not found, pkg-config will not be generated')
else
pkg = import('pkgconfig')
pkg.generate(libraries : lib,
version : version.stdout().strip(),
subdirs : ['deltachat'],
name : 'libdeltachat',
filebase : 'deltachat',
description : ' Create your own, email-compatible messenger.')
endif