Files
qt-creator/qbs/modules/libclang/libclang.qbs
Nikolai Kosjar 84dd43f413 qbs build: Fix passing on include dir for intrinsics of libclang
In

    commit 31258ec555
    qbs build: Introduce libclang module.

"llvmVersion" was overlooked.

Because of this, the definition of CLANG_RESOURCE_DIR in
clangcodemodel.qbs led to an invalid path which eventually was
discarded.

Change-Id: Ia1eb50cf738df4affbedc99849bf5326a8e8fb19
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-24 13:51:32 +00:00

40 lines
1.3 KiB
QML

import qbs
import qbs.File
import QtcFunctions
import "functions.js" as ClangFunctions
Module {
Probe {
id: clangProbe
property string llvmConfig
property string llvmVersion
property string llvmIncludeDir
property string llvmLibDir
property stringList llvmLibs
configure: {
llvmConfig = ClangFunctions.llvmConfig(qbs, QtcFunctions);
llvmVersion = ClangFunctions.version(llvmConfig);
llvmIncludeDir = ClangFunctions.includeDir(llvmConfig);
llvmLibDir = ClangFunctions.libDir(llvmConfig);
llvmLibs = ClangFunctions.libraries(qbs.targetOS);
found = llvmConfig && File.exists(llvmIncludeDir.concat("/clang-c/Index.h"));
}
}
property string llvmConfig: clangProbe.llvmConfig
property string llvmVersion: clangProbe.llvmVersion
property string llvmIncludeDir: clangProbe.llvmIncludeDir
property string llvmLibDir: clangProbe.llvmLibDir
property stringList llvmLibs: clangProbe.llvmLibs
validate: {
if (!clangProbe.found) {
console.warn("Set LLVM_INSTALL_DIR to build the Clang Code Model."
+ " For details, see doc/src/editors/creator-clang-codemodel.qdoc.");
throw "No usable libclang found";
}
}
}