Beispiel #1
0
}

js = gn_to_bp_utils.GenerateJSONFromGN(gn_args)


def strip_slashes(lst):
    return {str(p.lstrip('/')) for p in lst}


srcs = strip_slashes(js['targets']['//:libskqp_app']['sources'])
cflags = strip_slashes(js['targets']['//:libskqp_app']['cflags'])
cflags_cc = strip_slashes(js['targets']['//:libskqp_app']['cflags_cc'])
local_includes = strip_slashes(js['targets']['//:libskqp_app']['include_dirs'])
defines = {str(d) for d in js['targets']['//:libskqp_app']['defines']}

gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'sources', srcs, None)
gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'include_dirs',
                                   local_includes, 'freetype')
gn_to_bp_utils.GrabDependentValues(js, '//:libskqp_app', 'defines', defines,
                                   None)

# No need to list headers or other extra flags.
srcs = {s for s in srcs if not s.endswith('.h')}
cflags = gn_to_bp_utils.CleanupCFlags(cflags)
cflags_cc = gn_to_bp_utils.CleanupCCFlags(cflags_cc)

# We need to add the include path to the vulkan defines and header file set in
# then skia_vulkan_header gn arg that is used for framework builds.
local_includes.add("platform_tools/android/vulkan")

# Get architecture specific source files
Beispiel #2
0
srcs = strip_slashes(js['targets']['//:skia']['sources'])
cflags = strip_slashes(js['targets']['//:skia']['cflags'])
cflags_cc = strip_slashes(js['targets']['//:skia']['cflags_cc'])
local_includes = strip_slashes(js['targets']['//:skia']['include_dirs'])
export_includes = strip_slashes(js['targets']['//:public']['include_dirs'])
defines = [str(d) for d in js['targets']['//:skia']['defines']]
defines += extra_userconfig_defines

dm_srcs = strip_slashes(js['targets']['//:dm']['sources'])
dm_includes = strip_slashes(js['targets']['//:dm']['include_dirs'])

nanobench_target = js['targets']['//:nanobench']
nanobench_srcs = strip_slashes(nanobench_target['sources'])
nanobench_includes = strip_slashes(nanobench_target['include_dirs'])

gn_to_bp_utils.GrabDependentValues(js, '//:skia', 'sources', srcs, None)
gn_to_bp_utils.GrabDependentValues(js, '//:dm', 'sources', dm_srcs, 'skia')
gn_to_bp_utils.GrabDependentValues(js, '//:nanobench', 'sources',
                                   nanobench_srcs, 'skia')

# skcms is a little special, kind of a second-party library.
local_includes.add("third_party/skcms")
dm_includes.add("third_party/skcms")

# need to manually include the vulkanmemoryallocator headers. If HWUI ever needs
# direct access to the allocator we need to add it to export_includes as well.
srcs.add("third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp")
local_includes.add("third_party/vulkanmemoryallocator/")


# Android's build will choke if we list headers.
Beispiel #3
0
  return {str(p.lstrip('/')) for p in lst}

android_srcs    = strip_slashes(js['targets']['//:skia']['sources'])
cflags          = strip_slashes(js['targets']['//:skia']['cflags'])
cflags_cc       = strip_slashes(js['targets']['//:skia']['cflags_cc'])
local_includes  = strip_slashes(js['targets']['//:skia']['include_dirs'])
export_includes = strip_slashes(js['targets']['//:public']['include_dirs'])

dm_srcs         = strip_slashes(js['targets']['//:dm']['sources'])
dm_includes     = strip_slashes(js['targets']['//:dm']['include_dirs'])

nanobench_target = js['targets']['//:nanobench']
nanobench_srcs     = strip_slashes(nanobench_target['sources'])
nanobench_includes = strip_slashes(nanobench_target['include_dirs'])

gn_to_bp_utils.GrabDependentValues(js, '//:dm', 'sources', dm_srcs, 'skia')
gn_to_bp_utils.GrabDependentValues(js, '//:nanobench', 'sources',
                                   nanobench_srcs, 'skia')

# skcms is a little special, kind of a second-party library.
local_includes.add("include/third_party/skcms")
dm_includes   .add("include/third_party/skcms")

# Android's build will choke if we list headers.
def strip_headers(sources):
  return {s for s in sources if not s.endswith('.h')}

gn_to_bp_utils.GrabDependentValues(js, '//:skia', 'sources', android_srcs, None)
android_srcs    = strip_headers(android_srcs)

js_linux        = gn_to_bp_utils.GenerateJSONFromGN(gn_args_linux)
Beispiel #4
0
export_includes = strip_slashes(js['targets']['//:public']['include_dirs'])

gm_srcs = strip_slashes(js['targets']['//:gm']['sources'])
gm_includes = strip_slashes(js['targets']['//:gm']['include_dirs'])

test_srcs = strip_slashes(js['targets']['//:tests']['sources'])
test_includes = strip_slashes(js['targets']['//:tests']['include_dirs'])

dm_srcs = strip_slashes(js['targets']['//:dm']['sources'])
dm_includes = strip_slashes(js['targets']['//:dm']['include_dirs'])

nanobench_target = js['targets']['//:nanobench']
nanobench_srcs = strip_slashes(nanobench_target['sources'])
nanobench_includes = strip_slashes(nanobench_target['include_dirs'])

gn_to_bp_utils.GrabDependentValues(js, '//:gm', 'sources', gm_srcs, '//:skia')
gn_to_bp_utils.GrabDependentValues(js, '//:tests', 'sources', test_srcs,
                                   '//:skia')
gn_to_bp_utils.GrabDependentValues(js, '//:dm', 'sources', dm_srcs,
                                   ['//:skia', '//:gm', '//:tests'])
gn_to_bp_utils.GrabDependentValues(js, '//:nanobench', 'sources',
                                   nanobench_srcs, ['//:skia', '//:gm'])

# skcms is a little special, kind of a second-party library.
local_includes.add("include/third_party/skcms")
gm_includes.add("include/third_party/skcms")


# Android's build will choke if we list headers.
def strip_headers(sources):
    return {s for s in sources if not s.endswith('.h')}