[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / crx_file / BUILD.gn
1 # Copyright 2014 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//third_party/protobuf/proto_library.gni")
6
7 static_library("crx_file") {
8   sources = [
9     "crx_file.h",
10     "crx_verifier.cc",
11     "crx_verifier.h",
12     "id_util.cc",
13     "id_util.h",
14   ]
15
16   deps = [
17     "//base",
18     "//crypto",
19   ]
20
21   public_deps = [ ":crx3_proto" ]
22 }
23
24 static_library("crx_creator") {
25   sources = [
26     "crx_creator.cc",
27     "crx_creator.h",
28   ]
29
30   deps = [
31     ":crx_file",
32     "//base",
33     "//crypto",
34   ]
35
36   public_deps = [ ":crx3_proto" ]
37 }
38
39 bundle_data("unit_tests_bundle_data") {
40   visibility = [ ":unit_tests" ]
41   testonly = true
42   sources = [
43     "//components/test/data/crx_file/sample.zip",
44     "//components/test/data/crx_file/unsigned.crx3",
45     "//components/test/data/crx_file/valid.crx2",
46     "//components/test/data/crx_file/valid_no_publisher.crx3",
47     "//components/test/data/crx_file/valid_publisher.crx3",
48     "//components/test/data/crx_file/valid_test_publisher.crx3",
49   ]
50   outputs = [ "{{bundle_resources_dir}}/" +
51               "{{source_root_relative_dir}}/{{source_file_part}}" ]
52 }
53
54 source_set("unit_tests") {
55   testonly = true
56   sources = [
57     "crx_creator_unittest.cc",
58     "crx_verifier_unittest.cc",
59     "id_util_unittest.cc",
60   ]
61
62   deps = [
63     ":crx_creator",
64     ":crx_file",
65     ":unit_tests_bundle_data",
66     "//base",
67     "//crypto",
68     "//testing/gtest",
69   ]
70 }
71
72 proto_library("crx3_proto") {
73   sources = [ "crx3.proto" ]
74 }
75
76 if (host_toolchain == current_toolchain) {
77   executable("crx3_build_action") {
78     testonly = true
79
80     sources = [ "crx_build_action_main.cc" ]
81
82     deps = [
83       ":crx_creator",
84       "//base",
85       "//crypto",
86     ]
87   }
88 }