blob: afea25772cead17169a35402cbedcdaa841680ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// -*- c++ -*-
// Distributed under the BSD 2-Clause License.
// See accompanying file LICENSE for details.
#include "externals_manual.h"
#include <map>
#include "libctor.h"
#include "settings.h"
extern std::map<std::string, std::string> external_includedir;
extern std::map<std::string, std::string> external_libdir;
int resolv(const Settings& settings, const std::string& name,
const ExternalManual& ext, Flags& flags)
{
flags = ext.flags;
auto inc = external_includedir.find(name);
if(inc != external_includedir.end())
{
flags.cflags.push_back("-I" + inc->second);
flags.cxxflags.push_back("-I" + inc->second);
}
auto lib = external_libdir.find(name);
if(lib != external_libdir.end())
{
flags.ldflags.push_back("-L" + lib->second);
}
return 0;
}
|