orotool/src/meson.build
King_DuckZ 5bf036f056 Replace timers with a templated one
They all do the same thing, the only difference
is the method they call on oro::Api, so
template on that
2020-08-10 21:52:56 +01:00

64 lines
1.6 KiB
Meson

restc_cpp_dep = dependency('restc-cpp', version: '>=0.1.1',
fallback: ['restc-cpp', 'restc_cpp_dep'],
default_options: [
'restc_cpp_with_unit_tests=false',
'restc_cpp_log_with_boost_log=false',
],
)
sqlitecpp_dep = dependency('sqlitecpp', version: '>=3.0.0',
fallback: ['SQLiteCpp', 'sqlitecpp_dep'],
)
ev_dep = dependency('libev', version: '>=4.31')
threads_dep = dependency('threads')
boost_dep = dependency('boost')
base_url = get_option('base_url').strip()
if not base_url.endswith('/')
base_url = base_url + '/'
endif
conf = configuration_data()
conf.set_quoted('BASE_URL', base_url)
conf.set_quoted('CONFIG_FILE_PATH', get_option('prefix') / get_option('sysconfdir') / meson.project_name() + '.conf')
project_config_file = configure_file(
input: 'config.hpp.in',
output: meson.project_name() + '_config.hpp',
configuration: conf,
)
gnulib_conf = configuration_data()
gnulib_conf.set('_GL_ATTRIBUTE_CONST', '__attribute__ ((__const__))')
configure_file(output : 'config.h', configuration : gnulib_conf)
lib_deps = [
restc_cpp_dep,
sqlitecpp_dep,
ev_dep,
threads_dep,
boost_dep,
]
executable(meson.project_name(),
'main.cpp',
'ini_file.cpp',
'oro/datatypes.cpp',
'oro/api.cpp',
'oro/dateconv.cpp',
'oro/items.cpp',
'oro/shops.cpp',
'evloop.cpp',
'eventia/eventia.cpp',
'eventia/timer.cpp',
'timer_base.cpp',
'oro/originsdb.cpp',
'gnulib/lib/base64.c',
'base64.cpp',
'app_config.cpp',
project_config_file,
install: true,
dependencies: lib_deps,
include_directories: date_incdir,
cpp_args: ['-DEV_USE_STDEXCEPT'],
)