• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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.
4 
5 #ifndef TOOLS_GN_CREATE_BUNDLE_TARGET_GENERATOR_H_
6 #define TOOLS_GN_CREATE_BUNDLE_TARGET_GENERATOR_H_
7 
8 #include <string_view>
9 
10 #include "gn/target_generator.h"
11 
12 class SourceDir;
13 
14 // Populates a Target with the values from a create_bundle rule.
15 class CreateBundleTargetGenerator : public TargetGenerator {
16  public:
17   CreateBundleTargetGenerator(Target* target,
18                               Scope* scope,
19                               const FunctionCallNode* function_call,
20                               Err* err);
21   ~CreateBundleTargetGenerator() override;
22 
23  protected:
24   void DoRun() override;
25 
26  private:
27   bool FillBundleDir(const SourceDir& bundle_root_dir,
28                      std::string_view name,
29                      SourceDir* bundle_dir);
30 
31   bool FillXcodeExtraAttributes();
32 
33   bool FillProductType();
34   bool FillPartialInfoPlist();
35   bool FillXcodeTestApplicationName();
36 
37   bool FillCodeSigningScript();
38   bool FillCodeSigningSources();
39   bool FillCodeSigningOutputs();
40   bool FillCodeSigningArgs();
41   bool FillBundleDepsFilter();
42   bool FillXcassetCompilerFlags();
43 
44   CreateBundleTargetGenerator(const CreateBundleTargetGenerator&) = delete;
45   CreateBundleTargetGenerator& operator=(const CreateBundleTargetGenerator&) =
46       delete;
47 };
48 
49 #endif  // TOOLS_GN_CREATE_BUNDLE_TARGET_GENERATOR_H_
50