Clang: Fix compilation on Windows

...for LLVM snapshots (http://llvm.org/builds).

Check for lib/libclang.* if lib/clang.* is not found.

Change-Id: I6e24ac0fe696153626ded1ed3a7db85ce8d7b0f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-01-03 09:03:40 +01:00
parent c09747e1db
commit a20c874f73
2 changed files with 14 additions and 4 deletions

View File

@@ -35,10 +35,19 @@ defineReplace(findLLVMConfig) {
win32 {
LLVM_INCLUDEPATH = $$LLVM_INSTALL_DIR/include
LLVM_LIBS = -L$$LLVM_INSTALL_DIR/bin \
exists ($${LLVM_INSTALL_DIR}/lib/clang.*) {
CLANG_LIB = clang
} else {
exists ($${LLVM_INSTALL_DIR}/lib/libclang.*) {
CLANG_LIB = libclang
} else {
error("Cannot find Clang shared library!")
}
}
LLVM_LIBS = \
-L$$LLVM_INSTALL_DIR/bin \
-L$$LLVM_INSTALL_DIR/lib \
-lclang
-l$${CLANG_LIB}
LLVM_LIBS += -ladvapi32 -lshell32
}

View File

@@ -32,11 +32,12 @@
#ifdef WITH_TESTS
#include "../clangcompleter.h"
#include <QObject>
#include <QTextDocument>
#include <texteditor/basetexteditor.h>
#include <cplusplus/CppDocument.h>
#include <clangcompleter.h>
namespace TextEditor { class IAssistProposal; }