-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
31 lines (24 loc) · 1.02 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
project('http-server', 'c',
version: '0.1',
license: 'MPL-2.0',
default_options: ['warning_level=3'])
# define source files
src = files('src'/'file_cache.c', 'src'/'format_bytes.c', 'src'/'macro.c', 'src'/'magic.c', 'src'/'main.c', 'src'/'serve.c', 'src'/'serve_directory.c', 'src'/'serve_file.c', 'src'/'serve_result.c', 'src'/'status_code.c', 'src'/'util.c')
# define project metadata
url = 'https://github.com/mekb-turtle/http-server'
name = meson.project_name()
version = meson.project_version()
add_project_arguments(
f'-DPROJECT_NAME="@name@"',
f'-DPROJECT_VERSION="@version@"',
f'-DPROJECT_URL="@url@"',
language: 'c')
subproject('hashmap')
xxd = find_program('xxd')
src += custom_target(input: 'src' / 'site.css', command: [xxd, '-i', '@INPUT@', '@OUTPUT@'], output: '@PLAINNAME@.c', install: false, build_by_default: true)
exe = executable('http-server', sources: src, install: true, dependencies: [
dependency('libmicrohttpd'),
dependency('libcjson'),
dependency('libmagic'),
dependency('hashmap')
])