blob: 4694dbcb13a66ace1ef38d8933bde2369ad90f55 (
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
34
35
36
37
38
39
|
import qbs 1.0
import qbs.FileInfo
import 'qtfunctions.js' as QtFunctions
Module {
Depends { name: "cpp" }
Depends { name: "Qt.core" }
property string qtModuleName
property path binPath: Qt.core.binPath
property path incPath: Qt.core.incPath
property path libPath: Qt.core.libPath
property string qtLibInfix: Qt.core.libInfix
property string repository: Qt.core.versionMajor === 5 ? 'qtbase' : undefined
property string includeDirName: 'Qt' + qtModuleName
property string internalLibraryName: QtFunctions.getQtLibraryName(qtModuleName + qtLibInfix, Qt.core, qbs)
property string qtVersion: Qt.core.version
property bool hasLibrary: true
Properties {
condition: qtModuleName != undefined
cpp.includePaths: {
var modulePath = FileInfo.joinPaths(incPath, includeDirName);
var paths = [incPath, modulePath];
if (Qt.core.versionMajor >= 5)
paths.unshift(FileInfo.joinPaths(modulePath, qtVersion, includeDirName));
if (Qt.core.frameworkBuild)
paths.unshift(libPath + '/' + includeDirName + qtLibInfix + '.framework/Versions/' + Qt.core.versionMajor + '/Headers');
return paths;
}
cpp.dynamicLibraries: Qt.core.frameworkBuild || !hasLibrary
? undefined : [internalLibraryName]
cpp.frameworks: Qt.core.frameworkBuild && hasLibrary ? [internalLibraryName] : undefined
cpp.defines: qtModuleName.contains("private")
? [] : [ "QT_" + qtModuleName.toUpperCase() + "_LIB" ]
}
}
|