qbsprojectmanager.qbs 3.25 KB
Newer Older
1
import qbs 1.0
2
import qbs.FileInfo
Tobias Hunger's avatar
Tobias Hunger committed
3

4
import QtcPlugin
Tobias Hunger's avatar
Tobias Hunger committed
5 6 7 8

QtcPlugin {
    name: "QbsProjectManager"

9 10 11
    property var externalQbsIncludes: project.useExternalQbs
            ? [project.qbs_install_dir + "/include/qbs"] : []
    property var externalQbsLibraryPaths: project.useExternalQbs
12
            ? [project.qbs_install_dir + '/' + project.libDirName] : []
13 14 15 16
    property var externalQbsDynamicLibraries: {
        var libs = []
        if (!project.useExternalQbs)
            return libs;
17
        var suffix = "";
18 19 20
        if (qbs.targetOS.contains("windows")) {
            libs.push("shell32")
            if (qbs.enableDebugCode)
21
                suffix = "d";
22
        }
23
        libs.push("qbscore" + suffix, "qbsqtprofilesetup" + suffix);
24 25
        return libs
    }
Tobias Hunger's avatar
Tobias Hunger committed
26

27
    condition: project.buildQbsProjectManager
Tobias Hunger's avatar
Tobias Hunger committed
28

29
    property bool useInternalQbsProducts: project.qbsSubModuleExists && !project.useExternalQbs
30 31 32

    Depends { name: "Qt"; submodules: [ "widgets", "script" ] }
    Depends { name: "Aggregation" }
33 34
    Depends {
        name: "qbscore"
35 36 37 38 39
        condition: product.useInternalQbsProducts
    }
    Depends {
        name: "qbsqtprofilesetup"
        condition: product.useInternalQbsProducts
40
    }
41 42 43 44 45 46 47 48
    Depends { name: "QmlJS" }
    Depends { name: "Utils" }

    Depends { name: "ProjectExplorer" }
    Depends { name: "Core" }
    Depends { name: "CppTools" }
    Depends { name: "QtSupport" }
    Depends { name: "QmlJSTools" }
Tobias Hunger's avatar
Tobias Hunger committed
49 50

    cpp.defines: base.concat([
51 52
        'QML_BUILD_STATIC_LIB',
        'QBS_INSTALL_DIR="'
53 54 55
                + (project.useExternalQbs
                       ? FileInfo.fromWindowsSeparators(project.qbs_install_dir)
                       : '')
56 57
                + '"'
    ])
58 59
    cpp.includePaths: base.concat(externalQbsIncludes)
    cpp.libraryPaths: base.concat(externalQbsLibraryPaths)
60
    cpp.rpaths: base.concat(externalQbsLibraryPaths)
61
    cpp.dynamicLibraries: base.concat(externalQbsDynamicLibraries)
Tobias Hunger's avatar
Tobias Hunger committed
62 63

    files: [
64
        "qbsprojectmanager.qrc",
Tobias Hunger's avatar
Tobias Hunger committed
65 66
        "defaultpropertyprovider.cpp",
        "defaultpropertyprovider.h",
67
        "propertyprovider.h",
Tobias Hunger's avatar
Tobias Hunger committed
68 69 70 71
        "qbsbuildconfiguration.cpp",
        "qbsbuildconfiguration.h",
        "qbsbuildconfigurationwidget.cpp",
        "qbsbuildconfigurationwidget.h",
72
        "qbsbuildinfo.h",
Tobias Hunger's avatar
Tobias Hunger committed
73 74 75 76 77 78
        "qbsbuildstep.cpp",
        "qbsbuildstep.h",
        "qbsbuildstepconfigwidget.ui",
        "qbscleanstep.cpp",
        "qbscleanstep.h",
        "qbscleanstepconfigwidget.ui",
79 80
        "qbsdeployconfigurationfactory.cpp",
        "qbsdeployconfigurationfactory.h",
Tobias Hunger's avatar
Tobias Hunger committed
81 82 83
        "qbsinstallstep.cpp",
        "qbsinstallstep.h",
        "qbsinstallstepconfigwidget.ui",
Tobias Hunger's avatar
Tobias Hunger committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
        "qbslogsink.cpp",
        "qbslogsink.h",
        "qbsnodes.cpp",
        "qbsnodes.h",
        "qbsparser.cpp",
        "qbsparser.h",
        "qbsproject.cpp",
        "qbsproject.h",
        "qbsprojectfile.cpp",
        "qbsprojectfile.h",
        "qbsprojectmanager.cpp",
        "qbsprojectmanager.h",
        "qbsprojectmanager_global.h",
        "qbsprojectmanagerconstants.h",
        "qbsprojectmanagerplugin.cpp",
        "qbsprojectmanagerplugin.h",
100 101
        "qbsprojectparser.cpp",
        "qbsprojectparser.h",
102 103
        "qbspropertylineedit.cpp",
        "qbspropertylineedit.h",
Tobias Hunger's avatar
Tobias Hunger committed
104
        "qbsrunconfiguration.cpp",
Tobias Hunger's avatar
Tobias Hunger committed
105
        "qbsrunconfiguration.h"
Tobias Hunger's avatar
Tobias Hunger committed
106 107 108
    ]
}