mazetd/meson.build

48 lines
1.2 KiB
Meson
Raw Permalink Normal View History

2020-03-15 15:57:29 +01:00
project('mazetd', 'cpp',
version : '0.1',
default_options : ['warning_level=3',
'cpp_std=c++17'])
2020-03-17 16:16:02 +01:00
project_sources = []
project_header_files = []
inc = [include_directories('subprojects/entt/single_include/'),
include_directories('src')]
subdir('src')
2020-03-15 15:57:29 +01:00
sfml_deps = []
sfml_modules = ['window', 'graphics', 'system']
foreach mod : sfml_modules
sfml_deps += [dependency('sfml-' + mod)]
endforeach
spdlog_proj = subproject('spdlog')
spdlog_dep = spdlog_proj.get_variable('spdlog_dep')
2020-03-17 16:16:02 +01:00
# This adds the clang format file to the build directory
configure_file(input : '.clang-format',
output : '.clang-format',
copy: true)
2020-03-15 15:57:29 +01:00
2020-03-17 16:16:02 +01:00
exe = executable('mazetd', project_sources,
include_directories: inc,
2020-03-15 15:57:29 +01:00
dependencies : sfml_deps + [spdlog_dep])
2020-03-17 16:16:02 +01:00
run_target('format',
command : ['clang-format','-i','-style=file', project_sources, project_header_files])
2020-03-15 15:57:29 +01:00
test('basic', exe)
2020-03-17 16:16:02 +01:00
regex = '^((?!(third_party|tests|benchmarks|gtest|subprojects)).)*$'
# This adds clang tidy support
configure_file(input : '.clang-tidy',
output : '.clang-tidy',
copy : true)
run_target('tidy',
command : ['run-clang-tidy.py','-fix', '-j' , '8', 'files', regex ,'-format', '-p='+ meson.build_root()])