Blame nouveau/meson.build

Packit Service 103f6b
# Copyright © 2017-2018 Intel Corporation
Packit Service 103f6b
Packit Service 103f6b
# Permission is hereby granted, free of charge, to any person obtaining a copy
Packit Service 103f6b
# of this software and associated documentation files (the "Software"), to deal
Packit Service 103f6b
# in the Software without restriction, including without limitation the rights
Packit Service 103f6b
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
Packit Service 103f6b
# copies of the Software, and to permit persons to whom the Software is
Packit Service 103f6b
# furnished to do so, subject to the following conditions:
Packit Service 103f6b
Packit Service 103f6b
# The above copyright notice and this permission notice shall be included in
Packit Service 103f6b
# all copies or substantial portions of the Software.
Packit Service 103f6b
Packit Service 103f6b
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Service 103f6b
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Service 103f6b
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Packit Service 103f6b
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit Service 103f6b
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
Packit Service 103f6b
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Packit Service 103f6b
# SOFTWARE.
Packit Service 103f6b
Packit Service 103f6b
Packit Service 103f6b
libdrm_nouveau = shared_library(
Packit Service 103f6b
  'drm_nouveau',
Packit Service 103f6b
  [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file],
Packit Service 103f6b
  c_args : libdrm_c_args,
Packit Service 103f6b
  include_directories : [inc_root, inc_drm],
Packit Service 103f6b
  link_with : libdrm,
Packit Service 103f6b
  dependencies : [dep_threads, dep_atomic_ops],
Packit Service 103f6b
  version : '2.0.0',
Packit Service 103f6b
  install : true,
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
ext_libdrm_nouveau = declare_dependency(
Packit Service 103f6b
  link_with : [libdrm, libdrm_nouveau],
Packit Service 103f6b
  include_directories : [inc_drm, include_directories('.')],
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
install_headers('nouveau.h', subdir : 'libdrm/nouveau')
Packit Service 103f6b
install_headers(
Packit Service 103f6b
  'nvif/class.h', 'nvif/cl0080.h', 'nvif/cl9097.h', 'nvif/if0002.h',
Packit Service 103f6b
  'nvif/if0003.h', 'nvif/ioctl.h', 'nvif/unpack.h',
Packit Service 103f6b
  subdir : 'libdrm/nouveau/nvif'
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
pkg.generate(
Packit Service 103f6b
  name : 'libdrm_nouveau',
Packit Service 103f6b
  libraries : libdrm_nouveau,
Packit Service 103f6b
  subdirs : ['.', 'libdrm', 'libdrm/nouveau'],
Packit Service 103f6b
  version : meson.project_version(),
Packit Service 103f6b
  requires_private : 'libdrm',
Packit Service 103f6b
  description : 'Userspace interface to nouveau kernel DRM services',
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
test(
Packit Service 103f6b
  'nouveau-symbols-check',
Packit Service 103f6b
  symbols_check,
Packit Service 103f6b
  args : [
Packit Service 103f6b
    '--lib', libdrm_nouveau,
Packit Service 103f6b
    '--symbols-file', files('nouveau-symbols.txt'),
Packit Service 103f6b
    '--nm', prog_nm.path(),
Packit Service 103f6b
  ],
Packit Service 103f6b
)