QtcProduct.qbs 1.84 KB
Newer Older
1
import qbs 1.0
2
import qbs.FileInfo
3
import qbs.Utilities
4 5 6
import QtcFunctions

Product {
7
    name: project.name
8
    version: qtc.qtcreator_version
9
    property bool install: true
10
    property string installDir
11
    property stringList installTags: type
12
    property string fileName: FileInfo.fileName(sourceDirectory) + ".qbs"
13 14 15 16 17
    property bool useNonGuiPchFile: false
    property bool useGuiPchFile: false
    property string pathToSharedSources: FileInfo.joinPaths(path,
            FileInfo.relativePath(FileInfo.joinPaths('/', qtc.ide_qbs_imports_path),
                                  FileInfo.joinPaths('/', qtc.ide_shared_sources_path)))
18 19

    Depends { name: "cpp" }
20
    Depends { name: "qtc" }
21
    Depends { name: product.name + " dev headers"; required: false }
22

23 24 25 26 27
    Properties {
        condition: Utilities.versionCompare(Qt.core.version, "5.7") < 0
        cpp.minimumMacosVersion: "10.8"
    }

Marco Bubke's avatar
Marco Bubke committed
28
    cpp.cxxLanguageVersion: "c++14"
29
    cpp.defines: qtc.generalDefines
30
    cpp.minimumWindowsVersion: qbs.architecture === "x86" ? "5.1" : "5.2"
31
    cpp.useCxxPrecompiledHeader: useNonGuiPchFile || useGuiPchFile
32
    cpp.visibility: "minimal"
33 34 35 36

    Depends { name: "Qt.core" }

    Group {
37
        fileTagsFilter: installTags
38
        qbs.install: install
39 40
        qbs.installDir: installDir
    }
41 42 43 44 45 46

    Group {
        fileTagsFilter: ["qtc.dev-module"]
        qbs.install: true
        qbs.installDir: qtc.ide_qbs_modules_path + '/' + product.name
    }
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

    Group {
        name: "standard pch file (non-gui)"
        condition: useNonGuiPchFile
        prefix: pathToSharedSources + '/'
        files: ["qtcreator_pch.h"]
        fileTags: ["cpp_pch_src"]
    }

    Group {
        name: "standard pch file (gui)"
        condition: useGuiPchFile
        prefix: pathToSharedSources + '/'
        files: ["qtcreator_gui_pch.h"]
        fileTags: ["cpp_pch_src"]
    }
63
}