| Index: tools/gn/config_values_generator.cc
|
| diff --git a/tools/gn/config_values_generator.cc b/tools/gn/config_values_generator.cc
|
| index 3cc8235face1472d3c858b8f82c736e5c45d12f8..db2ed1e77ca13473f502f133c9bcc1963bfb460d 100644
|
| --- a/tools/gn/config_values_generator.cc
|
| +++ b/tools/gn/config_values_generator.cc
|
| @@ -44,6 +44,23 @@ void GetDirList(
|
| (config_values->*accessor)().swap(result);
|
| }
|
|
|
| +void GetSrcList(
|
| + Scope* scope,
|
| + const char* var_name,
|
| + ConfigValues* config_values,
|
| + const SourceDir input_dir,
|
| + std::vector<SourceFile>& (ConfigValues::* accessor)(),
|
| + Err* err) {
|
| + const Value* value = scope->GetValue(var_name, true);
|
| + if (!value)
|
| + return; // No value, empty input and succeed.
|
| +
|
| + std::vector<SourceFile> result;
|
| + ExtractListOfRelativeFiles(scope->settings()->build_settings(),
|
| + *value, input_dir, &result, err);
|
| + (config_values->*accessor)().swap(result);
|
| +}
|
| +
|
| } // namespace
|
|
|
| ConfigValuesGenerator::ConfigValuesGenerator(
|
| @@ -66,6 +83,9 @@ void ConfigValuesGenerator::Run() {
|
| #define FILL_DIR_CONFIG_VALUE(name) \
|
| GetDirList(scope_, #name, config_values_, input_dir_, \
|
| &ConfigValues::name, err_);
|
| +#define FILL_SRC_CONFIG_VALUE(name) \
|
| + GetSrcList(scope_, #name, config_values_, input_dir_, \
|
| + &ConfigValues::name, err_);
|
|
|
| FILL_STRING_CONFIG_VALUE(asmflags)
|
| FILL_STRING_CONFIG_VALUE(cflags)
|
| @@ -77,9 +97,11 @@ void ConfigValuesGenerator::Run() {
|
| FILL_DIR_CONFIG_VALUE( include_dirs)
|
| FILL_STRING_CONFIG_VALUE(ldflags)
|
| FILL_DIR_CONFIG_VALUE( lib_dirs)
|
| + FILL_SRC_CONFIG_VALUE( bundle_data)
|
|
|
| #undef FILL_STRING_CONFIG_VALUE
|
| #undef FILL_DIR_CONFIG_VALUE
|
| +#undef FILL_SRC_CONFIG_VALUE
|
|
|
| // Libs
|
| const Value* libs_value = scope_->GetValue("libs", true);
|
|
|