| # Copyright 2016 The Fuchsia Authors |
| # |
| # Permission is hereby granted, free of charge, to any person obtaining a |
| # copy of this software and associated documentation files (the "Software"), |
| # to deal in the Software without restriction, including without limitation |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| # and/or sell copies of the Software, and to permit persons to whom the |
| # Software is furnished to do so, subject to the following conditions: |
| # |
| # The above copyright notice and this permission notice (including the next |
| # paragraph) shall be included in all copies or substantial portions of the |
| # Software. |
| # |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| # IN THE SOFTWARE. |
| |
| import("//magma/gnbuild/magma.gni") |
| |
| config("include_config") { |
| include_dirs = [ "." ] |
| } |
| |
| source_set("GL") { |
| public_configs = [ ":include_config" ] |
| sources = [ |
| "GL/gl.h", |
| "GL/gl_mangle.h", |
| "GL/glcorearb.h", |
| "GL/glext.h", |
| "GL/glx.h", |
| "GL/glx_mangle.h", |
| "GL/glxext.h", |
| "GL/internal/dri_interface.h", |
| "GL/osmesa.h", |
| "GL/wglext.h", |
| ] |
| } |
| |
| config("vulkan_public_config") { |
| defines = [ "VK_USE_PLATFORM_MAGMA_KHR=1" ] |
| } |
| |
| source_set("vulkan") { |
| public_configs = [ |
| ":include_config", |
| ":vulkan_public_config", |
| ] |
| sources = [ |
| "vulkan/vk_platform.h", |
| "vulkan/vulkan.h", |
| "vulkan/vulkan_intel.h", |
| ] |
| } |
| |
| source_set("pci_ids") { |
| public_configs = [ ":include_config" ] |
| sources = [ |
| "pci_ids/i810_pci_ids.h", |
| "pci_ids/i915_pci_ids.h", |
| "pci_ids/i965_pci_ids.h", |
| "pci_ids/r200_pci_ids.h", |
| "pci_ids/r300_pci_ids.h", |
| "pci_ids/r600_pci_ids.h", |
| "pci_ids/radeon_pci_ids.h", |
| "pci_ids/radeonsi_pci_ids.h", |
| "pci_ids/virtio_gpu_pci_ids.h", |
| "pci_ids/vmwgfx_pci_ids.h", |
| ] |
| } |
| |
| config("c_compat_public_config") { |
| defines = [ |
| "_DEFAULT_SOURCE", |
| "HAVE_PTHREAD=1", |
| ] |
| } |
| |
| source_set("c_compat") { |
| public_configs = [ |
| ":include_config", |
| ":c_compat_public_config", |
| ] |
| |
| sources = [ |
| "c11/threads.h", |
| "c11/threads_posix.h", |
| "c99_alloca.h", |
| "c99_compat.h", |
| "c99_math.h", |
| "no_extern_c.h", |
| ] |
| } |