# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Build configuration for OpenCL-related targets.

import("../../gni/angle.gni")

angle_source_set("cl_includes") {
  sources = [
    "../../include/CL/cl.h",
    "../../include/CL/cl_d3d10.h",
    "../../include/CL/cl_d3d11.h",
    "../../include/CL/cl_dx9_media_sharing.h",
    "../../include/CL/cl_dx9_media_sharing_intel.h",
    "../../include/CL/cl_egl.h",
    "../../include/CL/cl_ext.h",
    "../../include/CL/cl_ext_intel.h",
    "../../include/CL/cl_gl.h",
    "../../include/CL/cl_gl_ext.h",
    "../../include/CL/cl_half.h",
    "../../include/CL/cl_icd.h",
    "../../include/CL/cl_layer.h",
    "../../include/CL/cl_platform.h",
    "../../include/CL/cl_va_api_media_sharing_intel.h",
    "../../include/CL/cl_version.h",
    "../../include/CL/opencl.h",
    "../../include/angle_cl.h",
    "../../include/export.h",
  ]
}

angle_shared_library("OpenCL") {
  defines = [ "LIBCL_IMPLEMENTATION" ]

  sources = [
    "cl_loader.h",
    "cl_loader_autogen.cpp",
    "libOpenCL_autogen.cpp",
  ]

  configs += [
    "$angle_root:debug_annotations_config",
    "$angle_root:library_name_config",
  ]

  deps = [
    ":cl_includes",
    "$angle_root:angle_common",
  ]
}

group("angle_cl") {
  data_deps = [ ":OpenCL" ]
}
