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 FillPostProcessingScript(); 38 bool FillPostProcessingSources(); 39 bool FillPostProcessingOutputs(); 40 bool FillPostProcessingArgs(); 41 bool FillBundleDepsFilter(); 42 bool FillXcassetCompilerFlags(); 43 bool FillTransparent(); 44 45 CreateBundleTargetGenerator(const CreateBundleTargetGenerator&) = delete; 46 CreateBundleTargetGenerator& operator=(const CreateBundleTargetGenerator&) = 47 delete; 48 }; 49 50 #endif // TOOLS_GN_CREATE_BUNDLE_TARGET_GENERATOR_H_ 51