diff options
Diffstat (limited to 'Swiften/Config/swiften-config.cpp')
-rw-r--r-- | Swiften/Config/swiften-config.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Swiften/Config/swiften-config.cpp b/Swiften/Config/swiften-config.cpp index 81a8357..778134d 100644 --- a/Swiften/Config/swiften-config.cpp +++ b/Swiften/Config/swiften-config.cpp @@ -16,13 +16,14 @@ #include <Swiften/Base/Platform.h> #include <Swiften/Base/Paths.h> +#include <Swiften/Base/Path.h> #include <Swiften/Version.h> #include "swiften-config.h" using namespace Swift; -void printFlags(const std::vector<std::string>& flags) { +static void printFlags(const std::vector<std::string>& flags) { for (size_t i = 0; i < flags.size(); ++i) { if (i > 0) { std::cout << " "; @@ -90,12 +91,12 @@ int main(int argc, char* argv[]) { for(size_t i = 0; i < libs.size(); ++i) { if (inPlace) { std::string lib = libs[i]; - boost::replace_all(lib, "#", topSourcePath.string()); + boost::replace_all(lib, "#", pathToString(topSourcePath)); libs[i] = lib; } else { std::string lib = libs[i]; - boost::replace_all(lib, "#", (topInstallPath / "lib").string()); + boost::replace_all(lib, "#", pathToString(topInstallPath / "lib")); boost::erase_all(lib, "/Swiften"); libs[i] = lib; } @@ -103,12 +104,12 @@ int main(int argc, char* argv[]) { for(size_t i = 0; i < cflags.size(); ++i) { if (inPlace) { std::string cflag = cflags[i]; - boost::replace_all(cflag, "#", topSourcePath.string()); + boost::replace_all(cflag, "#", pathToString(topSourcePath)); cflags[i] = cflag; } else { std::string cflag = cflags[i]; - boost::replace_all(cflag, "#", (topInstallPath / "include").string()); + boost::replace_all(cflag, "#", pathToString(topInstallPath / "include")); cflags[i] = cflag; } } @@ -118,7 +119,7 @@ int main(int argc, char* argv[]) { if (vm.count("libs") > 0) { printFlags(libs); } - else if (vm.count("cflags") > 0) { + if (vm.count("cflags") > 0) { printFlags(cflags); } return 0; |