orotool/src/meson.build
King_DuckZ 9f0fed98e2 Get the concept working
A bit hackish because see ThreadPool.hpp.
Also code is dirty and it can't be stopped once running.
Building up from here.
2020-08-09 17:29:37 +01:00

59 lines
1.4 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',
],
)
sqlitecpp_dep = dependency('sqlitecpp', version: '>=3.0.0',
fallback: ['SQLiteCpp', 'sqlitecpp_dep'],
)
ev_dep = dependency('libev', version: '>=4.31')
threads_dep = dependency('threads')
if get_option('thread_pool') == 'taskflow'
taskflow_dep = dependency('Cpp-Taskflow', version: '>=2.4.0', method: 'cmake')
endif
base_url = get_option('base_url').strip()
if not base_url.endswith('/')
base_url = base_url + '/'
endif
conf = configuration_data()
conf.set('BASE_URL', base_url)
if get_option('thread_pool') == 'roar11'
conf.set('THREAD_POOL_TYPE', 'ROAR11')
elif get_option('thread_pool') == 'taskflow'
conf.set('THREAD_POOL_TYPE', 'TASKFLOW')
endif
project_config_file = configure_file(
input: 'config.hpp.in',
output: meson.project_name() + '_config.hpp',
configuration: conf,
)
lib_deps = [
restc_cpp_dep,
sqlitecpp_dep,
ev_dep,
threads_dep,
]
if get_option('thread_pool') == 'taskflow'
lib_deps += [taskflow_dep]
endif
executable(meson.project_name(),
'main.cpp',
'oro/datatypes.cpp',
'oro/api.cpp',
'oro/dateconv.cpp',
'oro/items.cpp',
'oro/shops.cpp',
'evloop.cpp',
project_config_file,
install: true,
dependencies: lib_deps,
include_directories: date_incdir,
cpp_args: ['-DEV_USE_STDEXCEPT'],
)