// -*- c++ -*- // Distributed under the BSD 2-Clause License. // See accompanying file LICENSE for details. #include "externals_manual.h" #include #include "ctor.h" #include "util.h" #include "tools.h" extern std::map external_includedir; extern std::map external_libdir; int resolv(const ctor::settings& settings, const ctor::external_configuration& config, const ctor::external_manual& ext, ctor::flags& flags) { flags = ext.flags; auto inc = external_includedir.find(config.name); if(inc != external_includedir.end()) { flags.cflags.push_back({ctor::c_opt::include_path, inc->second}); flags.cxxflags.push_back({ctor::cxx_opt::include_path, inc->second}); } auto lib = external_libdir.find(config.name); if(lib != external_libdir.end()) { flags.ldflags.push_back({ctor::ld_opt::library_path, lib->second}); } return 0; }