1# Copyright 2022 The ANGLE Project Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("../../gni/angle.gni") 6import("mesa_autogen.gni") 7 8angle_mesa_build_dir = "$root_build_dir/mesa" 9angle_libdrm_build_dir = "$root_build_dir/libdrm" 10 11action("libdrm_setup") { 12 script = "mesa_build.py" 13 args = [ 14 "setup", 15 "libdrm", 16 rebase_path(root_build_dir, root_build_dir), 17 ] 18 sources = [ "libdrm.stamp" ] 19 outputs = [ "$angle_libdrm_build_dir/libdrm.stamp" ] 20} 21 22action("libdrm") { 23 script = "mesa_build.py" 24 args = [ 25 "compile", 26 rebase_path(angle_libdrm_build_dir, root_build_dir), 27 ] 28 sources = rebase_path(angle_libdrm_sources, ".", "../libdrm") 29 outputs = get_path_info( 30 rebase_path(angle_libdrm_outputs, ".", angle_libdrm_build_dir), 31 "abspath") 32 deps = [ ":libdrm_setup" ] 33} 34 35action("mesa_setup") { 36 script = "mesa_build.py" 37 args = [ 38 "setup", 39 "mesa", 40 rebase_path(root_build_dir, root_build_dir), 41 ] 42 sources = [ "mesa.stamp" ] 43 outputs = [ "$angle_mesa_build_dir/mesa.stamp" ] 44 deps = [ ":libdrm" ] 45} 46 47action("mesa") { 48 script = "mesa_build.py" 49 args = [ 50 "compile", 51 rebase_path(angle_mesa_build_dir, root_build_dir), 52 ] 53 sources = rebase_path(angle_mesa_sources, ".", "src") 54 outputs = 55 get_path_info(rebase_path(angle_mesa_outputs, ".", angle_mesa_build_dir), 56 "abspath") 57 deps = [ ":mesa_setup" ] 58} 59