Blame intel/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
libdrm_intel = shared_library(
Packit Service 103f6b
  'drm_intel',
Packit Service 103f6b
  [
Packit Service 103f6b
    files(
Packit Service 103f6b
      'intel_bufmgr.c', 'intel_bufmgr_fake.c', 'intel_bufmgr_gem.c',
Packit Service 103f6b
      'intel_decode.c', 'mm.c', 'intel_chipset.c',
Packit Service 103f6b
    ),
Packit Service 103f6b
    config_file,
Packit Service 103f6b
  ],
Packit Service 103f6b
  include_directories : [inc_root, inc_drm],
Packit Service 103f6b
  link_with : libdrm,
Packit Service 103f6b
  dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops],
Packit Service 103f6b
  c_args : libdrm_c_args,
Packit Service 103f6b
  version : '1.0.0',
Packit Service 103f6b
  install : true,
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
ext_libdrm_intel = declare_dependency(
Packit Service 103f6b
  link_with : [libdrm, libdrm_intel],
Packit Service 103f6b
  include_directories : [inc_drm, include_directories('.')],
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
install_headers(
Packit Service 103f6b
  'intel_bufmgr.h', 'intel_aub.h', 'intel_debug.h',
Packit Service 103f6b
  subdir : 'libdrm',
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
pkg.generate(
Packit Service 103f6b
  name : 'libdrm_intel',
Packit Service 103f6b
  libraries : libdrm_intel,
Packit Service 103f6b
  subdirs : ['.', 'libdrm'],
Packit Service 103f6b
  version : meson.project_version(),
Packit Service 103f6b
  requires : 'libdrm',
Packit Service 103f6b
  description : 'Userspace interface to intel kernel DRM services',
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
test_decode = executable(
Packit Service 103f6b
  'test_decode',
Packit Service 103f6b
  files('test_decode.c'),
Packit Service 103f6b
  include_directories : [inc_root, inc_drm],
Packit Service 103f6b
  link_with : [libdrm, libdrm_intel],
Packit Service 103f6b
  c_args : libdrm_c_args,
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
test(
Packit Service 103f6b
  'gen4-3d.batch',
Packit Service 103f6b
  find_program('tests/gen4-3d.batch.sh'),
Packit Service 103f6b
  workdir : meson.current_build_dir(),
Packit Service 103f6b
)
Packit Service 103f6b
test(
Packit Service 103f6b
  'gen45-3d.batch',
Packit Service 103f6b
  find_program('tests/gm45-3d.batch.sh'),
Packit Service 103f6b
  workdir : meson.current_build_dir(),
Packit Service 103f6b
)
Packit Service 103f6b
test(
Packit Service 103f6b
  'gen5-3d.batch',
Packit Service 103f6b
  find_program('tests/gen5-3d.batch.sh'),
Packit Service 103f6b
  workdir : meson.current_build_dir(),
Packit Service 103f6b
)
Packit Service 103f6b
test(
Packit Service 103f6b
  'gen6-3d.batch',
Packit Service 103f6b
  find_program('tests/gen6-3d.batch.sh'),
Packit Service 103f6b
  workdir : meson.current_build_dir(),
Packit Service 103f6b
)
Packit Service 103f6b
test(
Packit Service 103f6b
  'gen7-3d.batch',
Packit Service 103f6b
  find_program('tests/gen7-3d.batch.sh'),
Packit Service 103f6b
  workdir : meson.current_build_dir(),
Packit Service 103f6b
)
Packit Service 103f6b
test(
Packit Service 103f6b
  'gen7-2d-copy.batch',
Packit Service 103f6b
  find_program('tests/gen7-2d-copy.batch.sh'),
Packit Service 103f6b
  workdir : meson.current_build_dir(),
Packit Service 103f6b
)
Packit Service 103f6b
Packit Service 103f6b
test(
Packit Service 103f6b
  'intel-symbols-check',
Packit Service 103f6b
  symbols_check,
Packit Service 103f6b
  args : [
Packit Service 103f6b
    '--lib', libdrm_intel,
Packit Service 103f6b
    '--symbols-file', files('intel-symbols.txt'),
Packit Service 103f6b
    '--nm', prog_nm.path(),
Packit Service 103f6b
  ],
Packit Service 103f6b
)