meson.build 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_radeon = library(
  18. 'drm_radeon',
  19. [
  20. files(
  21. 'radeon_bo_gem.c', 'radeon_cs_gem.c', 'radeon_cs_space.c', 'radeon_bo.c',
  22. 'radeon_cs.c', 'radeon_surface.c',
  23. ),
  24. config_file,
  25. ],
  26. c_args : libdrm_c_args,
  27. gnu_symbol_visibility : 'hidden',
  28. include_directories : [inc_root, inc_drm],
  29. link_with : libdrm,
  30. dependencies : [dep_threads, dep_atomic_ops],
  31. version : '1.@0@.0'.format(patch_ver),
  32. install : true,
  33. )
  34. ext_libdrm_radeon = declare_dependency(
  35. link_with : [libdrm, libdrm_radeon],
  36. include_directories : [inc_drm, include_directories('.')],
  37. )
  38. meson.override_dependency('libdrm_radeon', ext_libdrm_radeon)
  39. install_headers(
  40. 'radeon_bo.h', 'radeon_cs.h', 'radeon_surface.h', 'radeon_bo_gem.h',
  41. 'radeon_cs_gem.h', 'radeon_bo_int.h', 'radeon_cs_int.h', 'r600_pci_ids.h',
  42. subdir : 'libdrm'
  43. )
  44. pkg.generate(
  45. libdrm_radeon,
  46. name : 'libdrm_radeon',
  47. subdirs : ['.', 'libdrm'],
  48. description : 'Userspace interface to kernel DRM services for radeon',
  49. )
  50. test(
  51. 'radeon-symbols-check',
  52. symbols_check,
  53. args : [
  54. '--lib', libdrm_radeon,
  55. '--symbols-file', files('radeon-symbols.txt'),
  56. '--nm', prog_nm.full_path(),
  57. ],
  58. )