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

import "../QtcPlugin.qbs" as QtcPlugin

QtcPlugin {
    name: "QbsProjectManager"

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

30
    condition: project.buildQbsProjectManager
Tobias Hunger's avatar
Tobias Hunger committed
31 32 33 34 35 36 37 38

    Depends { name: "Qt"; submodules: [ "widgets", "script" ] }
    Depends { name: "ProjectExplorer" }
    Depends { name: "Core" }
    Depends { name: "CppTools" }
    Depends { name: "TextEditor" }
    Depends { name: "QtSupport" }
    Depends { name: "QmlJS" }
39
    Depends { name: "QmlJSTools" }
40 41 42 43
    Depends {
        name: "qbscore"
        condition: project.qbsSubModuleExists && !project.useExternalQbs
    }
Tobias Hunger's avatar
Tobias Hunger committed
44 45

    cpp.defines: base.concat([
46 47 48 49 50
        'QML_BUILD_STATIC_LIB',
        'QBS_INSTALL_DIR="'
                + (project.useExternalQbs ? project.qbs_install_dir.split("\\").join("/") : '')
                + '"'
    ])
51 52 53 54
    cpp.includePaths: base.concat(externalQbsIncludes)
    cpp.libraryPaths: base.concat(externalQbsLibraryPaths)
    cpp.rpaths: base.concat(externalQbsRPaths)
    cpp.dynamicLibraries: base.concat(externalQbsDynamicLibraries)
Tobias Hunger's avatar
Tobias Hunger committed
55 56

    files: [
Tobias Hunger's avatar
Tobias Hunger committed
57 58
        "defaultpropertyprovider.cpp",
        "defaultpropertyprovider.h",
59
        "propertyprovider.h",
Tobias Hunger's avatar
Tobias Hunger committed
60 61 62 63
        "qbsbuildconfiguration.cpp",
        "qbsbuildconfiguration.h",
        "qbsbuildconfigurationwidget.cpp",
        "qbsbuildconfigurationwidget.h",
64
        "qbsbuildinfo.h",
Tobias Hunger's avatar
Tobias Hunger committed
65 66 67 68 69 70
        "qbsbuildstep.cpp",
        "qbsbuildstep.h",
        "qbsbuildstepconfigwidget.ui",
        "qbscleanstep.cpp",
        "qbscleanstep.h",
        "qbscleanstepconfigwidget.ui",
71 72
        "qbsdeployconfigurationfactory.cpp",
        "qbsdeployconfigurationfactory.h",
Tobias Hunger's avatar
Tobias Hunger committed
73 74 75
        "qbsinstallstep.cpp",
        "qbsinstallstep.h",
        "qbsinstallstepconfigwidget.ui",
Tobias Hunger's avatar
Tobias Hunger committed
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
        "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",
92 93
        "qbspropertylineedit.cpp",
        "qbspropertylineedit.h",
Tobias Hunger's avatar
Tobias Hunger committed
94 95
        "qbsrunconfiguration.cpp",
        "qbsrunconfiguration.h",
96
        "qbsstep.cpp",
Tobias Hunger's avatar
Tobias Hunger committed
97
        "qbsstep.h"
Tobias Hunger's avatar
Tobias Hunger committed
98 99 100
    ]
}