qbsprojectmanager.qbs 3.37 KB
Newer Older
1
import qbs 1.0
2
import qbs.FileInfo
Tobias Hunger's avatar
Tobias Hunger committed
3 4 5 6

QtcPlugin {
    name: "QbsProjectManager"

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

25
    condition: project.buildQbsProjectManager
Tobias Hunger's avatar
Tobias Hunger committed
26

27
    property bool useInternalQbsProducts: project.qbsSubModuleExists && !project.useExternalQbs
28 29

    Depends { name: "Qt"; submodules: [ "widgets", "script" ] }
30 31
    Depends {
        name: "qbscore"
32 33 34 35 36
        condition: product.useInternalQbsProducts
    }
    Depends {
        name: "qbsqtprofilesetup"
        condition: product.useInternalQbsProducts
37
    }
38 39 40 41 42 43 44 45
    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
46 47

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

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