project('SQLiteCpp', 'cpp', version: '3.0.0', meson_version: '>=0.49.2', default_options: ['cpp_std=gnu++11'], ) sqlite_dep = dependency('sqlite3', version: '>=3.32.1') pub_incdir = include_directories('SQLiteCpp/include') compiler_opts = [] if get_option('sqlite_enable_column_metadata') compiler_opts += ['-DSQLITE_ENABLE_COLUMN_METADATA'] endif if get_option('sqlite_enable_assert_handler') compiler_opts += ['SQLITECPP_ENABLE_ASSERT_HANDLER'] endif if get_option('sqlite_has_codec') compiler_opts += ['SQLITE_HAS_CODEC'] endif if get_option('sqlite_use_legacy_struct') compiler_opts += ['SQLITE_USE_LEGACY_STRUCT'] endif sqlitecpp_target = library(meson.project_name(), 'SQLiteCpp/src/Backup.cpp', 'SQLiteCpp/src/Column.cpp', 'SQLiteCpp/src/Database.cpp', 'SQLiteCpp/src/Exception.cpp', 'SQLiteCpp/src/Statement.cpp', 'SQLiteCpp/src/Transaction.cpp', install: true, include_directories: [pub_incdir], dependencies: [sqlite_dep], c_args: compiler_opts, cpp_args: compiler_opts, ) sqlitecpp_dep = declare_dependency( link_with: sqlitecpp_target, include_directories: pub_incdir, compile_args: compiler_opts, )