diff --git a/remaken.pro b/remaken.pro index 281a549..e848d2e 100755 --- a/remaken.pro +++ b/remaken.pro @@ -1,5 +1,5 @@ TARGET = remaken -VERSION=1.10.0 +VERSION=1.10.1 CONFIG += c++1z CONFIG += console diff --git a/src/tools/ConanSystemTool.cpp b/src/tools/ConanSystemTool.cpp index 1bfcb5c..34b03b0 100755 --- a/src/tools/ConanSystemTool.cpp +++ b/src/tools/ConanSystemTool.cpp @@ -191,7 +191,13 @@ void ConanSystemTool::install(const Dependency & dependency) std::string conanOptionPrefix = optionInfos.front(); optionInfos.erase(optionInfos.begin()); if (optionInfos.empty()) { - optionsArgs.push_back("-o " + option); + if (m_conanVersion >= 2) { + optionsArgs.push_back("-o " + dependency.getName() + "/*:" + option); + } + else + { + optionsArgs.push_back("-o " + option); // conan v1 + } } else { if (conanOptionPrefix.find(separator) != std::string::npos) { optionsArgs.push_back("-o " + conanOptionPrefix + ":" + optionInfos.front()); @@ -226,11 +232,16 @@ void ConanSystemTool::install(const Dependency & dependency) result = bp::system(command.c_str()); } else { - std::string buildMode = "shared=True"; + std::string buildMode = ""; + if (m_conanVersion >= 2) { + buildMode = dependency.getName() + "/*:"; + } if (dependency.getMode() == "static") { - buildMode = "shared=False"; + buildMode += "shared=False"; + } + else { + buildMode += "shared=True"; } - std::string command = m_systemInstallerPath.generic_string(utf8) + " install " + "-o " + buildMode + " " + boost::algorithm::join(settingsArgs, " ") + " -s " + buildType + " -s " + cppStd + " -pr " + profileName + " " + buildForceDep + " " + boost::algorithm::join(optionsArgs, " ") + " " + source; if (m_options.getVerbose()) { std::cout << command.c_str() << std::endl; @@ -690,7 +701,12 @@ std::vector ConanSystemTool::retrievePaths(const Dependency & dependen if (dependency.hasOptions()) { boost::split(options, dependency.getToolOptions(), [](char c){return c == '#';}); for (const auto & option: options) { - optionsArgs.push_back("-o " + option); + if (m_conanVersion >= 2) { + optionsArgs.push_back("-o " + dependency.getName() + "/*:" + option); + } + else { + optionsArgs.push_back("-o " + option); + } } } std::string profileName = m_options.getConanProfile(); @@ -717,7 +733,7 @@ std::vector ConanSystemTool::retrievePaths(const Dependency & dependen } } else { - std::string buildMode = "";//dependency.getName() + ":"; + std::string buildMode = ""; if (dependency.getMode() == "static") { buildMode += "shared=False"; } @@ -769,11 +785,10 @@ std::vector ConanSystemTool::retrievePaths(const Dependency & dependen if (m_options.getVerbose()) { std::cout << command.c_str() << std::endl; } - // SLETODO : issue with : bp::std_out > bp::null => use std::system (ok with it) result = std::system(command.c_str()); } else { - std::string buildMode = "";//dependency.getName() + ":"; + std::string buildMode = dependency.getName() + "/*:"; if (dependency.getMode() == "static") { buildMode += "shared=False"; } @@ -787,7 +802,6 @@ std::vector ConanSystemTool::retrievePaths(const Dependency & dependen if (m_options.getVerbose()) { std::cout << command.c_str() << std::endl; } - // SLETODO : issue with redirect : bp::std_out > bp::null => use std::system (ok with it) result = std::system(command.c_str()); } if (result != 0) {