include_directories : inc,
link_with : libecoli,
dependencies: [yaml_dep, edit_dep])
+
+install_data(
+ 'parse-yaml.sh',
+ install_dir : get_option('bindir'))
project('libecoli',
'c',
version : '0.1',
- license : 'BSD-3-clause')
-
-# if debug
-add_global_arguments('-Wall', language : 'c')
-add_global_arguments('-Werror', language : 'c')
-add_global_arguments('-W', language : 'c')
-add_global_arguments('-Wextra', language : 'c')
+ license : 'BSD-3-clause',
+ default_options: ['warning_level=2'])
edit_dep = dependency('libedit', method: 'pkg-config')
yaml_dep = dependency('yaml-0.1', method: 'pkg-config')
+# XXX if debug
+add_global_arguments('-Werror', language : 'c')
+
subdir('src')
subdir('test')
subdir('examples')
'ecoli_assert.c',
'ecoli_complete.c',
'ecoli_config.c',
- 'ecoli_editline.c',
'ecoli_init.c',
'ecoli_keyval.c',
'ecoli_log.c',
'ecoli_strvec.c',
'ecoli_test.c',
'ecoli_vec.c',
- 'ecoli_yaml.c',
]
+deps = []
+if get_option('with_yaml')
+ libecoli_sources += [
+ 'ecoli_yaml.c',
+ ]
+ deps += [
+ yaml_dep,
+ ]
+endif
+if get_option('with_editline')
+ libecoli_sources += [
+ 'ecoli_editline.c',
+ ]
+ deps += [
+ edit_dep,
+ ]
+endif
+
libecoli = shared_library('ecoli',
libecoli_sources,
include_directories : inc,
- dependencies : [edit_dep, yaml_dep],
+ dependencies : deps,
install : true)