Edit

kc3-lang/angle/samples/BUILD.gn

Branch :

  • Show log

    Commit

  • Author : Frank Henigman
    Date : 2017-08-28 22:53:24
    Hash : d0ef13a2
    Message : Stand-alone build with gn. This should do the same things as the stand-alone gyp build, but with gn. You should switch to gn as gyp support will go away. You need a recent enough version of gn. If yours is too old try this one: ./buildtools/linux64/gn If "gclient sync" or anything fails with an ImportError on gyp stuff, try running it with the following PYTHONPATH in the environment: PYTHONPATH=tools/gyp/pylib BUG=angleproject:1569 Change-Id: I56d19bec2d8b649a7bd65062c656cbfc69ea3dd8 Reviewed-on: https://chromium-review.googlesource.com/642588 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>

  • samples/BUILD.gn
  • # Copyright 2017 The Chromium Authors. All rights reserved.
    # Use of this source code is governed by a BSD-style license that can be
    # found in the LICENSE file.
    
    executable("shader_translator") {
      sources = [ "shader_translator/shader_translator.cpp", ]
      include_dirs = [ "../include", ]
      deps = [ "../:translator", ]
    }
    
    config("sample_util_config") {
      include_dirs = [ "sample_util" ]
    }
    
    
    static_library("sample_util") {
      sources = [
        "sample_util/SampleApplication.cpp",
        "sample_util/SampleApplication.h",
        "sample_util/texture_utils.cpp",
        "sample_util/texture_utils.h",
        "sample_util/tga_utils.cpp",
        "sample_util/tga_utils.h",
      ]
      deps = [
        "../:angle_common",
        "../:angle_util",
        "../:libEGL",
        "../:libGLESv2",
      ]
      public_configs = [ ":sample_util_config" ]
    }
    
    template("angle_sample") {
      if (defined(invoker.data)) {
        copy(target_name + "_data") {
          sources = invoker.data
          outputs = [
            "$root_out_dir/{{source_file_part}}",
          ]
        }
      }
    
      executable(target_name) {
        deps = [
          ":sample_util",
          "../:angle_util",
        ]
        if (defined(invoker.data)) {
          deps += [ ":${target_name}_data" ]
        }
        sources = invoker.sources
      }
    }
    
    angle_sample("hello_triangle") {
      sources = [
        "hello_triangle/HelloTriangle.cpp",
      ]
    }
    
    angle_sample("mip_map_2d") {
      sources = [
        "mip_map_2d/MipMap2D.cpp",
      ]
    }
    
    angle_sample("multi_texture") {
      sources = [
        "multi_texture/MultiTexture.cpp",
      ]
      data = [
        "multi_texture/basemap.tga",
        "multi_texture/lightmap.tga",
      ]
    }
    
    angle_sample("multi_window") {
      sources = [
        "multi_window/MultiWindow.cpp",
      ]
    }
    
    angle_sample("multiple_draw_buffers") {
      sources = [
        "multiple_draw_buffers/MultipleDrawBuffers.cpp",
      ]
      data = [
        "multiple_draw_buffers/multiple_draw_buffers_copy_fs.glsl",
        "multiple_draw_buffers/multiple_draw_buffers_fs.glsl",
        "multiple_draw_buffers/multiple_draw_buffers_vs.glsl",
      ]
    }
    
    angle_sample("multiview") {
      sources = [
        "multiview/Multiview.cpp",
      ]
    }
    
    angle_sample("particle_system") {
      sources = [
        "particle_system/ParticleSystem.cpp",
      ]
      data = [
        "particle_system/smoke.tga",
      ]
    }
    
    angle_sample("post_sub_buffer") {
      sources = [
        "post_sub_buffer/PostSubBuffer.cpp",
      ]
    }
    
    angle_sample("simple_instancing") {
      sources = [
        "simple_instancing/SimpleInstancing.cpp",
      ]
    }
    
    angle_sample("simple_texture_2d") {
      sources = [
        "simple_texture_2d/SimpleTexture2D.cpp",
      ]
    }
    
    angle_sample("simple_texture_cubemap") {
      sources = [
        "simple_texture_cubemap/SimpleTextureCubemap.cpp",
      ]
    }
    
    angle_sample("simple_vertex_shader") {
      sources = [
        "simple_vertex_shader/SimpleVertexShader.cpp",
      ]
    }
    
    angle_sample("stencil_operations") {
      sources = [
        "stencil_operations/StencilOperations.cpp",
      ]
    }
    
    angle_sample("tex_redef_microbench") {
      sources = [
        "tex_redef_microbench/TexRedefMicroBench.cpp",
      ]
    }
    
    angle_sample("texture_wrap") {
      sources = [
        "texture_wrap/TextureWrap.cpp",
      ]
    }
    
    angle_sample("tri_fan_microbench") {
      sources = [
        "tri_fan_microbench/TriFanMicroBench.cpp",
      ]
    }
    
    angle_sample("window_test") {
      sources = [
        "WindowTest/WindowTest.cpp",
      ]
    }
    
    group("all") {
      testonly = true
      deps = [
        ":hello_triangle",
        ":mip_map_2d",
        ":multi_texture",
        ":multi_window",
        ":multiple_draw_buffers",
        ":multiview",
        ":particle_system",
        ":post_sub_buffer",
        ":sample_util",
        ":simple_instancing",
        ":simple_texture_2d",
        ":simple_texture_cubemap",
        ":simple_vertex_shader",
        ":stencil_operations",
        ":tex_redef_microbench",
        ":texture_wrap",
        ":tri_fan_microbench",
        ":window_test",
      ]
    }