|
|
@ -487,9 +487,18 @@ Project::Project(const Project *parent, const std::string &path, bool build) {
|
|
|
|
throw std::runtime_error(format_key_error(error, target.type_name, t.find("type")));
|
|
|
|
throw std::runtime_error(format_key_error(error, target.type_name, t.find("type")));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
t.optional("headers", target.headers);
|
|
|
|
|
|
|
|
t.optional("sources", target.sources);
|
|
|
|
t.optional("sources", target.sources);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Merge the headers into the sources
|
|
|
|
|
|
|
|
ConditionVector headers;
|
|
|
|
|
|
|
|
t.optional("headers", headers);
|
|
|
|
|
|
|
|
for (const auto &itr : headers) {
|
|
|
|
|
|
|
|
auto &dest = target.sources[itr.first];
|
|
|
|
|
|
|
|
for (const auto &jtr : itr.second) {
|
|
|
|
|
|
|
|
dest.push_back(jtr);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
t.optional("compile-definitions", target.compile_definitions);
|
|
|
|
t.optional("compile-definitions", target.compile_definitions);
|
|
|
|
t.optional("private-compile-definitions", target.private_compile_definitions);
|
|
|
|
t.optional("private-compile-definitions", target.private_compile_definitions);
|
|
|
|
|
|
|
|
|
|
|
@ -514,12 +523,6 @@ Project::Project(const Project *parent, const std::string &path, bool build) {
|
|
|
|
t.optional("precompile-headers", target.precompile_headers);
|
|
|
|
t.optional("precompile-headers", target.precompile_headers);
|
|
|
|
t.optional("private-precompile-headers", target.private_precompile_headers);
|
|
|
|
t.optional("private-precompile-headers", target.private_precompile_headers);
|
|
|
|
|
|
|
|
|
|
|
|
if (!target.headers.empty()) {
|
|
|
|
|
|
|
|
auto &sources = target.sources.nth(0).value();
|
|
|
|
|
|
|
|
const auto &headers = target.headers.nth(0)->second;
|
|
|
|
|
|
|
|
sources.insert(sources.end(), headers.begin(), headers.end());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t.optional("condition", target.condition);
|
|
|
|
t.optional("condition", target.condition);
|
|
|
|
t.optional("alias", target.alias);
|
|
|
|
t.optional("alias", target.alias);
|
|
|
|
|
|
|
|
|
|
|
|