1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

llvm-config-2: Fix --cflags and --includedir which pointed at the wrong

directory when running from a build directory.

llvm-svn: 145622
This commit is contained in:
Daniel Dunbar 2011-12-01 20:00:19 +00:00
parent 5cc5730434
commit 884620418e

View File

@ -210,16 +210,15 @@ int main(int argc, char **argv) {
std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir;
std::string ActiveIncludeOption;
if (IsInDevelopmentTree) {
ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include";
ActivePrefix = CurrentExecPrefix;
// CMake organizes the products differently than a normal prefix style
// layout.
if (DevelopmentTreeLayoutIsCMakeStyle) {
ActiveIncludeDir = ActiveObjRoot + "/include";
ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE;
ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE;
} else {
ActiveIncludeDir = ActiveObjRoot + "/include";
ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin";
ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib";
}