Commit fc41aa9d authored by Leesoo Ahn's avatar Leesoo Ahn
Browse files

meson prototype

it needs a test.
parent 6e3e4358
lib_sources = [
'gfbgraph-album.c',
'gfbgraph-authorizer.c',
'gfbgraph-common.c',
'gfbgraph-connectable.c',
'gfbgraph-goa-authorizer.c',
'gfbgraph-node.c',
'gfbgraph-photo.c',
'gfbgraph-simple-authorizer.c',
'gfbgraph-user.c',
]
lib_headers = [
'gfbgraph.h',
'gfbgraph-album.h',
'gfbgraph-authorizer.h',
'gfbgraph-common.h',
'gfbgraph-connectable.h',
'gfbgraph-goa-authorizer.h',
'gfbgraph-node.h',
'gfbgraph-photo.h',
'gfbgraph-simple-authorizer.h',
'gfbgraph-user.h',
]
lib_deps = [
dependency('glib-2.0'),
dependency('gio-2.0'),
dependency('json-glib-1.0'),
dependency('rest-0.7'),
dependency('libsoup-2.4'),
dependency('goa-1.0'),
]
lib_c_args = [
'-DG_LOG_DOMAIN="GFBGraph"',
'-g',
'-Og'
]
extra_c_args = [
'-DLIBSOUP_USE_UNSTABLE_REQUEST_API',
'-DGOA_API_IS_SUBJECT_TO_CHANGE'
]
gfbgraph_lib = shared_library('gfbgraph-' + api_version,
lib_sources,
include_directories: root_dir,
dependencies: lib_deps,
c_args: lib_c_args + extra_c_args,
install: true,
)
install_headers(lib_headers, subdir: 'gfbgraph')
project('libgfbgraph', 'c',
version: '0.2.4',
meson_version: '>=0.48',
license: 'LGPL2.1')
gnome = import('gnome')
gfbgraph_version = meson.project_version()
version_split = gfbgraph_version.split('.')
MAJOR_VERSION = version_split[0]
MINOR_VERSION = version_split[1]
MICRO_VERSION = version_split[2]
api_version = '@0@.@1@'.format(MAJOR_VERSION, MINOR_VERSION)
root_dir = include_directories('.')
subdir('gfbgraph')
subdir('tests')
configure_file(input : 'credentials.ini',
output : 'credentials.ini',
copy: true)
test('autoptr',
executable('autoptr', 'autoptr.c',
include_directories: root_dir,
dependencies: lib_deps,
c_args: lib_c_args,
link_with: gfbgraph_lib),
env: [
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_source_dir()),
]
)
test('gtestutils',
executable('gtestutils', 'gtestutils.c',
include_directories: root_dir,
dependencies: lib_deps,
c_args: lib_c_args,
link_with: gfbgraph_lib),
env: [
'CREDENTIALS_PATH=@0@'.format(meson.current_source_dir()),
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_source_dir()),
]
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment