# -*- mode: conf -*- project('pyzy', ['cpp', 'c'], version: '1.0.1-6', license: 'GPL', default_options: [ 'warning_level=2', 'werror=true', 'prefix=/usr', 'buildtype=release', 'strip=true', 'b_ndebug=if-release']) pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'pyzy') add_project_arguments( '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-DHAVE_LIBUUID', '-std=c++0x', '-DG_LOG_DOMAIN="libpyzy"', '-DPKGDATADIR="' + pkgdatadir + '"', language: 'cpp') if get_option('buildtype').startswith('release') add_project_arguments( '-DG_DISABLE_ASSERT', '-DG_DISABLE_CHECKS', language: 'cpp') endif glib = dependency('glib-2.0') sqlite3 = dependency('sqlite3') uuid = dependency('uuid') shared_dep = [glib, sqlite3, uuid] lib_src = [ 'BopomofoContext.cc', 'Database.cc', 'DoublePinyinContext.cc', 'DynamicSpecialPhrase.cc', 'FullPinyinContext.cc', 'InputContext.cc', 'PhoneticContext.cc', 'PhraseEditor.cc', 'PinyinContext.cc', 'PinyinParser.cc', 'SimpTradConverter.cc', 'SpecialPhrase.cc', 'SpecialPhraseTable.cc', 'Variant.cc', 'sqlite3_util.c', ] shared_library('pyzy-1.0', lib_src, soversion: '0', version: '0.101.1', dependencies: shared_dep, install: true) test('libpyzy-test', executable('dbtest', 'Database_test.cc', dependencies: shared_dep))