memoserv/meson.build
2025-02-15 11:24:13 +00:00

56 lines
1.7 KiB
Meson

project('memoserv', 'cpp',
version: '0.1.0',
meson_version: '>=0.63.0',
default_options: ['debug=true', 'cpp_std=c++17', 'b_ndebug=if-release']
)
is_debug_build = 0
if get_option('buildtype').startswith('debug')
is_debug_build = 1
endif
git_prog = find_program('git', required: false)
cpp = meson.get_compiler('cpp')
conf = configuration_data()
version_arr = meson.project_version().split('.')
conf.set('PROJECT_NAME', meson.project_name())
conf.set('PROJECT_VERSION_MAJOR', version_arr[0])
conf.set('PROJECT_VERSION_MINOR', version_arr[1])
conf.set('PROJECT_VERSION_PATCH', version_arr[2])
conf.set('COMPILER_NAME', cpp.get_id())
conf.set('COMPILER_VERSION', cpp.version())
conf.set('COPYRIGHT_YEAR', '2020')
conf.set('PROJECT_REPO_URL', 'https://alarmpi.no-ip.org/gitan/King_DuckZ/memoserv')
project_config_file = configure_file(
input: 'src/config.h.in',
output: 'config.h',
configuration: conf
)
if git_prog.found()
gitrev_config_file = vcs_tag(
command: [git_prog.path(), 'rev-parse', 'HEAD'],
input: 'src/git_version.h.in',
output: 'git_version.h',
fallback: ''
)
else
conf = configuration_data()
conf.set('VCS_TAG', '')
gitrev_config_file = configure_file(
input: 'src/git_version.h.in',
output: 'git_version.h',
configuration: conf
)
endif
app_config_model = files('src/app_config.h.in')
cxxopts_incl = include_directories('subprojects/cxxopts/include', '.')
memcard_proj = subproject('memcard')
memcard_dep = memcard_proj.get_variable('memcard_dep')
vectorwrapper_proj = subproject('vectorwrapper', default_options: ['build_testing=false'])
vectorwrapper_dep = vectorwrapper_proj.get_variable('vectorwrapper_dep')
subdir('src')