| gtest = dependency('gtest', main: true, disabler: true, required: false) |
| gmock = dependency('gmock', disabler: true, required: false) |
| if not gtest.found() or not gmock.found() |
| gtest_proj = import('cmake').subproject('googletest', required: false) |
| gtest = declare_dependency( |
| gtest_proj.dependency('gtest'), |
| gtest_proj.dependency('gtest_main'), |
| gmock = gtest_proj.dependency('gmock') |
| not get_option('tests').allowed(), |
| 'Googletest is required if tests are enabled' |
| test_include_dirs = ['.', '..'] |
| run_command('cp', '-r', '../specification/json/', meson.current_build_dir()) |
| run_command('mv', meson.current_build_dir() / 'json', meson.current_build_dir() / 'specification') |
| implicit_include_directories: false, |
| include_directories:include_directories(test_include_dirs), |
| cpp_args: '-fpermissive', |