Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / third_party / adobe / flash / BUILD.gn
blob7a5c99a434521e9bc7bb79b8686caaf09b8611d3
1 # Copyright 2014 The Chromium 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.
5 if (is_chrome_branded) {
6   if (is_linux && current_cpu == "x86") {
7     flapper_version_h_file = "symbols/ppapi/linux/flapper_version.h"
8     flapper_binary_files = [
9       "binaries/ppapi/linux/libpepflashplayer.so",
10       "binaries/ppapi/linux/manifest.json",
11     ]
12   } else if (is_linux && current_cpu == "x64") {
13     flapper_version_h_file = "symbols/ppapi/linux_x64/flapper_version.h"
14     flapper_binary_files = [
15       "binaries/ppapi/linux_x64/libpepflashplayer.so",
16       "binaries/ppapi/linux_x64/manifest.json",
17     ]
18   } else if (is_mac && current_cpu == "x86") {
19     flapper_version_h_file = "symbols/ppapi/mac/flapper_version.h"
20     flapper_binary_files = [
21       "binaries/ppapi/mac/PepperFlashPlayer.plugin",
22       "binaries/ppapi/mac/manifest.json",
23     ]
24   } else if (is_mac && current_cpu == "x64") {
25     flapper_version_h_file = "symbols/ppapi/mac_64/flapper_version.h"
26     flapper_binary_files = [
27       "binaries/ppapi/mac_64/PepperFlashPlayer.plugin",
28       "binaries/ppapi/mac_64/manifest.json",
29     ]
30   } else if (is_win && current_cpu == "x86") {
31     flapper_version_h_file = "symbols/ppapi/win/flapper_version.h"
32     flapper_binary_files = [
33       "binaries/ppapi/win/pepflashplayer.dll",
34       "binaries/ppapi/win/manifest.json",
35     ]
36   } else if (is_win && current_cpu == "x64") {
37     flapper_version_h_file = "symbols/ppapi/win_x64/flapper_version.h"
38     flapper_binary_files = [
39       "binaries/ppapi/win_x64/pepflashplayer.dll",
40       "binaries/ppapi/win_x64/manifest.json",
41     ]
42   } else {
43     flapper_version_h_file = "flapper_version.h"
44     flapper_binary_files = []
45   }
46 } else {
47   flapper_version_h_file = "flapper_version.h"
48   flapper_binary_files = []
51 copy("flapper_version_h") {
52   sources = [
53     flapper_version_h_file,
54   ]
55   outputs = [
56     "$root_gen_dir/{{source_file_part}}",
57   ]
60 if (flapper_binary_files == []) {
61   group("flapper_binaries") {
62     # NOP
63   }
64 } else {
65   copy("flapper_binaries") {
66     sources = flapper_binary_files
67     outputs = [
68       "$root_out_dir/PepperFlash/{{source_file_part}}",
69     ]
70   }