• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1gtest_src = [
2  'gtest/src/gtest-all.cc',
3  'gtest/src/gtest_main.cc',
4]
5gtest_inc = include_directories('gtest', 'gtest/include')
6
7test_flags = [
8  '-DGTEST_USE_OWN_TR1_TUPLE=0',
9  '-DGTEST_LANG_CXX11=1',
10  '-DGTEST_HAS_TR1_TUPLE=1',
11  '-std=c++11',
12]
13
14if not use_win32
15  test_flags += [
16    '-DGTEST_HAS_PTHREAD=1',
17    '-DPTHREADS',
18  ]
19endif
20
21gtest = static_library('gtest', gtest_src,
22                       cpp_args: test_flags,
23                       include_directories: gtest_inc)
24gtest_dep = declare_dependency(link_with: gtest,
25                               include_directories: gtest_inc)
26
27test_src = [
28  'test_main.cpp',
29  'test_internal.cpp',
30  'test_va_api_fixture.cpp',
31  'test_va_api_get_create_config.cpp',
32  'test_va_api_config_attribs.cpp',
33  'test_va_api_createsurfaces.cpp',
34  'test_va_api_createcontext.cpp',
35  'test_va_api_createbuffer.cpp',
36  'test_va_api_display_attribs.cpp',
37  'test_va_api_get_max_values.cpp',
38  'test_va_api_init_terminate.cpp',
39  'test_va_api_query_config.cpp',
40  'test_va_api_query_vendor.cpp',
41]
42
43tests_deps = [gtest_dep, dependency('threads')]
44
45if use_win32
46  tests_deps += [ win32_deps ]
47else
48  tests_deps += [ drm_deps ]
49endif
50
51tests = executable('test_va_api', test_src,
52                   cpp_args: test_flags,
53                   dependencies: tests_deps,
54                   install: true)
55
56test('test_va', tests)
57