|
|
@ -196,27 +196,29 @@ CMake::CMake(const std::string &path, bool build) {
|
|
|
|
|
|
|
|
|
|
|
|
#undef renamed
|
|
|
|
#undef renamed
|
|
|
|
|
|
|
|
|
|
|
|
auto optional_array = [&t](const toml::key &k, std::vector<std::string> &v) {
|
|
|
|
auto optional_array = [&t](const toml::key &k) {
|
|
|
|
|
|
|
|
std::vector<std::string> v;
|
|
|
|
if (t.contains(k)) {
|
|
|
|
if (t.contains(k)) {
|
|
|
|
v = detail::to_string_vec(toml::find(t, k).as_array());
|
|
|
|
v = detail::to_string_vec(toml::find(t, k).as_array());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return v;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
optional_array("compile-definitions", target.compile_definitions);
|
|
|
|
target.compile_definitions = optional_array("compile-definitions");
|
|
|
|
optional_array("compile-features", target.compile_features);
|
|
|
|
target.compile_features = optional_array("compile-features");
|
|
|
|
optional_array("compile-options", target.compile_options);
|
|
|
|
target.compile_options = optional_array("compile-options");
|
|
|
|
optional_array("include-directories", target.include_directories);
|
|
|
|
target.include_directories = optional_array("include-directories");
|
|
|
|
optional_array("link-directories", target.link_directories);
|
|
|
|
target.link_directories = optional_array("link-directories");
|
|
|
|
optional_array("link-libraries", target.link_libraries);
|
|
|
|
target.link_libraries = optional_array("link-libraries");
|
|
|
|
optional_array("link-options", target.link_options);
|
|
|
|
target.link_options = optional_array("link-options");
|
|
|
|
optional_array("precompile-headers", target.precompile_headers);
|
|
|
|
target.precompile_headers = optional_array("precompile-headers");
|
|
|
|
|
|
|
|
|
|
|
|
if (t.contains("alias")) {
|
|
|
|
if (t.contains("alias")) {
|
|
|
|
target.alias = toml::find(t, "alias").as_string();
|
|
|
|
target.alias = toml::find(t, "alias").as_string();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (t.contains("properties")) {
|
|
|
|
if (t.contains("properties")) {
|
|
|
|
using prop_map = std::map<std::string, std::string>;
|
|
|
|
using prop_map = tsl::ordered_map<std::string, std::string>;
|
|
|
|
target.properties = toml::find<prop_map>(t, "properties");
|
|
|
|
target.properties = toml::find<prop_map>(t, "properties");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|