meson.build 1.3 KB
Newer Older
Jonas Ådahl's avatar
Jonas Ådahl committed
1 2 3 4 5 6 7 8 9 10
cogl_gles2_public_headers = [
  'GLES2/gl2.h',
  'GLES2/gl2ext.h',
  'GLES2/gl2platform.h',
]

cogl_gles2_sources = [
  'cogl-gles2-api.c',
]

11 12 13 14 15
libmutter_cogl_gles2_map = 'libmutter-cogl-gles2.map'
libmutter_cogl_gles2_link_args = [
  '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(),
      libmutter_cogl_gles2_map),
]
Jonas Ådahl's avatar
Jonas Ådahl committed
16 17
libmutter_cogl_gles2 = shared_library('mutter-cogl-gles2-' + libmutter_api_version,
  sources: [cogl_gles2_sources, cogl_gles2_public_headers],
18 19
  version: '0.0.0',
  soversion: 0,
Jonas Ådahl's avatar
Jonas Ådahl committed
20 21
  c_args: cogl_c_args,
  include_directories: [cogl_includepath, cogl_path_includepath],
22 23
  link_depends: libmutter_cogl_gles2_map,
  link_args: libmutter_cogl_gles2_link_args,
24
  dependencies: libmutter_cogl_dep,
Jonas Ådahl's avatar
Jonas Ådahl committed
25 26 27 28 29 30 31 32 33
  install_rpath: pkglibdir,
  install_dir: pkglibdir,
  install: true,
)

cogl_gles2_includedir = join_paths(cogl_includedir, 'cogl-gles2/GLES2')
install_headers(cogl_gles2_public_headers,
  subdir: cogl_gles2_includedir)

34
pkg.generate(libmutter_cogl_gles2,
Jonas Ådahl's avatar
Jonas Ådahl committed
35 36 37 38 39 40 41 42 43
  name: 'CoglGles2',
  filebase: 'mutter-cogl-gles2-' + libmutter_api_version,
  description: 'A cogl GLES2 helper library for mutter',
  subdirs: join_paths(pkgname, 'cogl'),
  requires: [cogl_pkg_deps, libmutter_cogl_name],
  version: meson.project_version(),
  variables: [
    'apiversion=' + libmutter_api_version,
  ],
44
  install_dir: pcdir,
Jonas Ådahl's avatar
Jonas Ådahl committed
45
)