Merge branch 'feature-msvc-static' of https://github.com/gmh5225/cmkr into feature-msvc-static

main
gmh5225 2 years ago
commit 5fe8220728
No known key found for this signature in database
GPG Key ID: 3BBC731F40B2CEC1

@ -67,7 +67,6 @@ struct Target {
TargetType type = target_last;
std::string type_name;
ConditionVector headers;
ConditionVector sources;
// https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html#project-commands

@ -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")));
}
t.optional("headers", target.headers);
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("private-compile-definitions", target.private_compile_definitions);

Loading…
Cancel
Save