meson.build 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Copyright © 2017-2018 Intel Corporation
  2. # Permission is hereby granted, free of charge, to any person obtaining a copy
  3. # of this software and associated documentation files (the "Software"), to deal
  4. # in the Software without restriction, including without limitation the rights
  5. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  6. # copies of the Software, and to permit persons to whom the Software is
  7. # furnished to do so, subject to the following conditions:
  8. # The above copyright notice and this permission notice shall be included in
  9. # all copies or substantial portions of the Software.
  10. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  14. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  15. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  16. # SOFTWARE.
  17. libdrm_intel = library(
  18. 'drm_intel',
  19. [
  20. files(
  21. 'intel_bufmgr.c', 'intel_bufmgr_fake.c', 'intel_bufmgr_gem.c',
  22. 'intel_decode.c', 'mm.c',
  23. ),
  24. config_file,
  25. ],
  26. include_directories : [inc_root, inc_drm],
  27. link_with : libdrm,
  28. dependencies : [dep_pciaccess, dep_threads, dep_rt, dep_valgrind, dep_atomic_ops],
  29. c_args : libdrm_c_args,
  30. gnu_symbol_visibility : 'hidden',
  31. version : '1.@0@.0'.format(patch_ver),
  32. install : true,
  33. )
  34. ext_libdrm_intel = declare_dependency(
  35. link_with : [libdrm, libdrm_intel],
  36. include_directories : [inc_drm, include_directories('.')],
  37. )
  38. meson.override_dependency('libdrm_intel', ext_libdrm_intel)
  39. install_headers(
  40. 'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
  41. subdir : 'libdrm',
  42. )
  43. pkg.generate(
  44. libdrm_intel,
  45. name : 'libdrm_intel',
  46. subdirs : ['.', 'libdrm'],
  47. requires : 'libdrm',
  48. description : 'Userspace interface to intel kernel DRM services',
  49. )
  50. test_decode = executable(
  51. 'test_decode',
  52. files('test_decode.c'),
  53. include_directories : [inc_root, inc_drm],
  54. link_with : [libdrm, libdrm_intel],
  55. c_args : libdrm_c_args,
  56. gnu_symbol_visibility : 'hidden',
  57. )
  58. test(
  59. 'gen4-3d.batch',
  60. find_program('tests/gen4-3d.batch.sh'),
  61. workdir : meson.current_build_dir(),
  62. )
  63. test(
  64. 'gen45-3d.batch',
  65. find_program('tests/gm45-3d.batch.sh'),
  66. workdir : meson.current_build_dir(),
  67. )
  68. test(
  69. 'gen5-3d.batch',
  70. find_program('tests/gen5-3d.batch.sh'),
  71. workdir : meson.current_build_dir(),
  72. )
  73. test(
  74. 'gen6-3d.batch',
  75. find_program('tests/gen6-3d.batch.sh'),
  76. workdir : meson.current_build_dir(),
  77. )
  78. test(
  79. 'gen7-3d.batch',
  80. find_program('tests/gen7-3d.batch.sh'),
  81. workdir : meson.current_build_dir(),
  82. )
  83. test(
  84. 'gen7-2d-copy.batch',
  85. find_program('tests/gen7-2d-copy.batch.sh'),
  86. workdir : meson.current_build_dir(),
  87. )
  88. test(
  89. 'intel-symbols-check',
  90. symbols_check,
  91. args : [
  92. '--lib', libdrm_intel,
  93. '--symbols-file', files('intel-symbols.txt'),
  94. '--nm', prog_nm.full_path(),
  95. ],
  96. )