orotool/src/meson.build

60 lines
1.4 KiB
Meson
Raw Normal View History

2020-06-20 00:15:24 +02:00
restc_cpp_dep = dependency('restc-cpp', version: '>=0.1.1',
fallback: ['restc-cpp', 'restc_cpp_dep'],
default_options: [
'restc_cpp_with_unit_tests=false',
],
)
2020-06-23 10:58:19 +02:00
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
2020-06-20 00:15:24 +02:00
executable(meson.project_name(),
'main.cpp',
2020-06-20 01:27:47 +02:00
'oro/datatypes.cpp',
'oro/api.cpp',
'oro/dateconv.cpp',
2020-06-22 20:53:56 +02:00
'oro/items.cpp',
2020-06-23 10:19:02 +02:00
'oro/shops.cpp',
'evloop.cpp',
project_config_file,
2020-06-20 00:15:24 +02:00
install: true,
dependencies: lib_deps,
2020-06-20 00:15:24 +02:00
include_directories: date_incdir,
cpp_args: ['-DEV_USE_STDEXCEPT'],
2020-06-20 00:15:24 +02:00
)