|
|
@@ -123,9 +123,9 @@ std::string targetFilePath( |
|
|
|
} |
|
|
|
|
|
|
|
void getFlags(const BBVariables &vars, FileType type, std::vector<std::string> &flags) { |
|
|
|
auto std = vars.find("std"); |
|
|
|
if (std != vars.end() && std->second.size() > 0) { |
|
|
|
flags.push_back("-std=" + std->second[1]); |
|
|
|
auto stdver = vars.find("std"); |
|
|
|
if (stdver != vars.end() && stdver->second.size() > 0) { |
|
|
|
flags.push_back("-std=" + stdver->second[0]); |
|
|
|
} |
|
|
|
|
|
|
|
auto pkgs = vars.find("pkgs"); |
|
|
@@ -215,34 +215,6 @@ void getLDFlags(const BBVariables &vars, std::vector<std::string> &flags) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void getPkgConfigFlags(const std::vector<std::string> &pkgs, std::vector<std::string> &flags) { |
|
|
|
std::vector<std::string> argv; |
|
|
|
argv.push_back(getPkgConfig()); |
|
|
|
argv.push_back("--cflags"); |
|
|
|
for (auto &pkg: pkgs) { |
|
|
|
argv.push_back(pkg); |
|
|
|
} |
|
|
|
|
|
|
|
// Execute $(PKG_CONFIG) --cflags $(PKGS) |
|
|
|
std::string output; |
|
|
|
sys::execute(argv, &output, global::verbose >= 2); |
|
|
|
parseWhitespaceSeparated(output, flags); |
|
|
|
} |
|
|
|
|
|
|
|
void getPkgConfigLDLibs(const std::vector<std::string> &pkgs, std::vector<std::string> &flags) { |
|
|
|
std::vector<std::string> argv; |
|
|
|
argv.push_back(getPkgConfig()); |
|
|
|
argv.push_back("--libs"); |
|
|
|
for (auto &pkg: pkgs) { |
|
|
|
argv.push_back(pkg); |
|
|
|
} |
|
|
|
|
|
|
|
// Execute $(PKG_CONFIG) --libs $(PKGS) |
|
|
|
std::string output; |
|
|
|
sys::execute(argv, &output, global::verbose >= 2); |
|
|
|
parseWhitespaceSeparated(output, flags); |
|
|
|
} |
|
|
|
|
|
|
|
std::vector<std::string> getDependencies( |
|
|
|
const std::vector<std::string> &flags, |
|
|
|
FileType type, |