Skip to content

Commit

Permalink
Try to add meson dependency for stdx-allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed Dec 1, 2017
1 parent 0e174cf commit 6887cca
Show file tree
Hide file tree
Showing 16 changed files with 167 additions and 317 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ __dummy.html
dub.selections.json

# Auto-downloaded 3rd-party
lib/subprojects/allocator
lib/subprojects/diet/
lib/subprojects/libevent/
lib/subprojects/openssl/
Expand Down
32 changes: 10 additions & 22 deletions core/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,34 @@ install_subdir('vibe/', install_dir: 'include/d/vibe/')
# Build Targets
#

core_link_with = [vibe_utils_lib,
vibe_data_lib]

# Basic I/O and concurrency primitives, as well as low level utility functions
vibe_core_lib = library('vibe-core',
[vibe_core_src],
include_directories: [vibe_utils_src_dir,
vibe_data_src_dir,
openssl_inc,
libevent_inc],
install: true,
dependencies: [crypto_dep,
ssl_dep,
libevent_dep,
zlib_dep],
link_with: [core_link_with],
dependencies: [vibe_utils_dep, vibe_data_dep],
version: project_version,
soversion: project_soversion
)
pkgc.generate(name: 'vibe-core',
libraries: [vibe_core_lib] + core_link_with,
libraries: [vibe_core_lib],
requires: ['vibe-data', 'vibe-utils'],
subdirs: 'd/vibe',
version: project_version,
description: 'Basic I/O and concurrency primitives, as well as low level utility functions of Vibe.'
)

vibe_core_dep = declare_dependency(
link_with: [vibe_core_lib],
include_directories: [vibe_core_src_dir],
dependencies: [vibe_utils_dep, vibe_data_dep],
)

#
# Tests
#
vibe_test_core_exe = executable('vibe-test_core',
[vibe_core_src],
include_directories: [vibe_utils_src_dir,
vibe_data_src_dir,
openssl_inc,
libevent_inc],
dependencies: [zlib_dep,
crypto_dep,
ssl_dep,
libevent_dep],
link_with: [core_link_with],
dependencies: [vibe_utils_dep, vibe_data_dep],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
Expand Down
26 changes: 10 additions & 16 deletions crypto/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,34 @@ install_subdir('vibe/', install_dir: 'include/d/vibe/')
# Build Targets
#

crypto_link_with = [vibe_utils_lib,
vibe_core_lib]

# Cryptographic helper routines
vibe_crypto_lib = library('vibe-crypto',
[vibe_crypto_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir],
dependencies: [vibe_core_dep],
install: true,
link_with: [crypto_link_with],
version: project_version,
soversion: project_soversion
)
pkgc.generate(name: 'vibe-crypto',
libraries: [vibe_crypto_lib] + crypto_link_with,
libraries: [vibe_crypto_lib],
subdirs: 'd/vibe',
version: project_version,
requires: ['vibe-core'],
description: 'Cryptographic helper routines for Vibe.'
)

vibe_crypto_dep = declare_dependency(
link_with: [vibe_crypto_lib],
include_directories: [vibe_crypto_src_dir],
dependencies: [vibe_core_dep, vibe_utils_dep]
)

#
# Tests
#
vibe_test_crypto_exe = executable('vibe-test_crypto',
[vibe_crypto_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
openssl_inc,
libevent_inc],
dependencies: [zlib_dep,
crypto_dep,
ssl_dep,
libevent_dep],
link_with: [crypto_link_with],
dependencies: [vibe_core_dep],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
Expand Down
25 changes: 12 additions & 13 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,36 @@ install_subdir('vibe/', install_dir: 'include/d/vibe/')
# Build Targets
#

data_link_with = [vibe_utils_lib]

# Data format and serialization support
vibe_data_lib = library('vibe-data',
[vibe_data_src],
include_directories: [vibe_utils_src_dir],
install: true,
link_with: [data_link_with],
dependencies: [vibe_utils_dep],
version: project_version,
soversion: project_soversion
)

pkgc.generate(name: 'vibe-data',
libraries: [vibe_data_lib] + data_link_with,
libraries: [vibe_data_lib],
subdirs: 'd/vibe',
version: project_version,
requires: ['vibe-utils'],
description: 'Data format and serialization support for Vibe.'
)

vibe_data_dep = declare_dependency(
link_with: [vibe_data_lib],
include_directories: [vibe_data_src_dir],
dependencies: [vibe_utils_dep]
)

#
# Tests
#
vibe_test_data_exe = executable('vibe-test_data',
[vibe_data_src],
include_directories: [vibe_utils_src_dir,
openssl_inc,
libevent_inc],
dependencies: [zlib_dep,
crypto_dep,
ssl_dep,
libevent_dep],
link_with: [data_link_with],
include_directories: [vibe_utils_src_dir],
dependencies: [vibe_utils_dep],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
Expand Down
59 changes: 22 additions & 37 deletions http/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,62 +28,47 @@ install_subdir('vibe/', install_dir: 'include/d/vibe/')
# Build Targets
#

http_link_with = [vibe_core_lib,
vibe_utils_lib,
vibe_data_lib,
vibe_stream_lib,
vibe_textfilter_lib,
vibe_inet_lib,
vibe_tls_lib,
vibe_crypto_lib]

# HTTP server and client implementation and higher level HTTP functionality
vibe_http_lib = library('vibe-http',
[vibe_http_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
vibe_data_src_dir,
vibe_stream_src_dir,
vibe_textfilter_src_dir,
vibe_inet_src_dir,
vibe_tls_src_dir,
vibe_crypto_src_dir,
openssl_inc],
install: true,
dependencies: [zlib_dep,
dependencies: [
vibe_inet_dep,
vibe_tls_dep,
vibe_crypto_dep,
diet_dep],
link_with: [http_link_with],
install: true,
version: project_version,
soversion: project_soversion
)
pkgc.generate(name: 'vibe-http',
libraries: [vibe_http_lib] + http_link_with,
libraries: [vibe_http_lib],
subdirs: 'd/vibe',
version: project_version,
requires: 'diet',
requires: ['diet',
'vibe-inet',
'vibe-tls',
'vibe-crypto'],
description: 'Vibe HTTP server and client implementation and higher level HTTP functionality'
)

vibe_http_dep = declare_dependency(
link_with: [vibe_http_lib],
include_directories: [vibe_http_src_dir],
dependencies: [vibe_inet_dep,
vibe_tls_dep,
vibe_crypto_dep,
diet_dep],
)

#
# Tests
#
vibe_test_http_exe = executable('vibe-test_http',
[vibe_http_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
vibe_data_src_dir,
vibe_stream_src_dir,
vibe_textfilter_src_dir,
vibe_inet_src_dir,
vibe_tls_src_dir,
vibe_crypto_src_dir,
openssl_inc],
dependencies: [zlib_dep,
crypto_dep,
ssl_dep,
libevent_dep,
dependencies: [vibe_inet_dep,
vibe_tls_dep,
vibe_crypto_dep,
diet_dep],
link_with: [http_link_with],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
Expand Down
38 changes: 13 additions & 25 deletions inet/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,37 @@ install_subdir('vibe/', install_dir: 'include/d/vibe/')
# Build Targets
#

inet_link_with = [vibe_utils_lib,
vibe_core_lib,
vibe_data_lib,
vibe_stream_lib,
vibe_textfilter_lib]

# Internet standard functionality
vibe_inet_lib = library('vibe-inet',
[vibe_inet_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
vibe_data_src_dir,
vibe_stream_src_dir,
vibe_textfilter_src_dir],
dependencies: [vibe_stream_dep,
vibe_textfilter_dep],
install: true,
link_with: [inet_link_with],
version: project_version,
soversion: project_soversion
)
pkgc.generate(name: 'vibe-inet',
libraries: [vibe_inet_lib] + inet_link_with,
libraries: [vibe_inet_lib],
subdirs: 'd/vibe',
requires: ['vibe-stream', 'vibe-textfilter'],
version: project_version,
description: 'Internet standard functionality for Vibe.'
)

vibe_inet_dep = declare_dependency(
link_with: [vibe_inet_lib],
include_directories: [vibe_inet_src_dir],
dependencies: [vibe_stream_dep,
vibe_textfilter_dep],
)

#
# Tests
#
vibe_test_inet_exe = executable('vibe-test_inet',
[vibe_inet_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
vibe_data_src_dir,
vibe_stream_src_dir,
vibe_textfilter_src_dir,
openssl_inc,
libevent_inc],
dependencies: [zlib_dep,
crypto_dep,
ssl_dep,
libevent_dep],
link_with: [inet_link_with],
dependencies: [vibe_stream_dep,
vibe_textfilter_dep],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
Expand Down
4 changes: 4 additions & 0 deletions lib/subprojects/allocator.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[wrap-git]
directory=allocator
url=https://github.com/wilzbach/stdx-allocator
revision=head
39 changes: 13 additions & 26 deletions mail/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,37 @@ install_subdir('vibe/', install_dir: 'include/d/vibe/')
# Build Targets
#

mail_link_with = [vibe_utils_lib,
vibe_core_lib,
vibe_data_lib,
vibe_inet_lib,
vibe_stream_lib,
vibe_tls_lib]

# SMTP client support
vibe_mail_lib = library('vibe-mail',
[vibe_mail_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
vibe_data_src_dir,
vibe_inet_src_dir,
vibe_stream_src_dir,
vibe_tls_src_dir],
dependencies: [vibe_inet_dep,
vibe_tls_dep],
install: true,
link_with: [mail_link_with],
version: project_version,
soversion: project_soversion
)
pkgc.generate(name: 'vibe-mail',
libraries: [vibe_mail_lib] + mail_link_with,
libraries: [vibe_mail_lib],
subdirs: 'd/vibe',
version: project_version,
requires: ['vibe-inet', 'vibe-tls'],
description: 'SMTP client support for Vibe.'
)

vibe_mail_dep = declare_dependency(
link_with: [vibe_mail_lib],
include_directories: [vibe_mail_src_dir],
dependencies: [vibe_inet_dep,
vibe_tls_dep],
)

#
# Tests
#
vibe_test_mail_exe = executable('vibe-test_mail',
[vibe_mail_src],
include_directories: [vibe_utils_src_dir,
vibe_core_src_dir,
vibe_data_src_dir,
vibe_inet_src_dir,
vibe_stream_src_dir,
vibe_tls_src_dir],
dependencies: [zlib_dep,
crypto_dep,
ssl_dep,
libevent_dep],
link_with: [mail_link_with],
dependencies: [vibe_inet_dep,
vibe_tls_dep],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
Expand Down
Loading

0 comments on commit 6887cca

Please sign in to comment.