2020-06-09 13:07:36 +00:00
|
|
|
google_benchmark = subproject('google-benchmark')
|
|
|
|
google_benchmark_dep = google_benchmark.get_variable('google_benchmark_dep')
|
|
|
|
|
2020-07-30 11:55:42 +00:00
|
|
|
ttf_parser_dep = null_dep
|
2020-08-02 07:10:47 +00:00
|
|
|
if get_option('experimental_api') and add_languages('rust', required: false, native: true)
|
2020-06-17 22:03:05 +00:00
|
|
|
ttf_parser_dep = subproject('ttf-parser').get_variable('ttf_parser_dep')
|
|
|
|
endif
|
|
|
|
|
2020-08-12 18:34:26 +00:00
|
|
|
if ttf_parser_dep.found()
|
|
|
|
benchmark_cpp_args = ['-DHAVE_TTFPARSER']
|
|
|
|
else
|
|
|
|
benchmark_cpp_args = []
|
|
|
|
endif
|
|
|
|
|
2020-06-09 13:07:36 +00:00
|
|
|
benchmark('perf', executable('perf', 'perf.cc',
|
2020-06-17 22:03:05 +00:00
|
|
|
dependencies: [
|
|
|
|
google_benchmark_dep, freetype_dep,
|
|
|
|
|
|
|
|
# the last two, thread and dl, aren't nice as ttf-parser isn't no_std yet
|
|
|
|
# https://github.com/RazrFalcon/ttf-parser/issues/29
|
|
|
|
ttf_parser_dep, thread_dep, cpp.find_library('dl'),
|
|
|
|
],
|
2020-08-12 18:34:26 +00:00
|
|
|
cpp_args: benchmark_cpp_args,
|
2020-06-09 13:07:36 +00:00
|
|
|
include_directories: [incconfig, incsrc],
|
|
|
|
link_with: [libharfbuzz],
|
|
|
|
install: false,
|
2020-08-12 19:43:06 +00:00
|
|
|
), workdir: join_paths(meson.current_source_dir(), '..'), timeout: 100)
|