qbsprojectmanager.qbs 2.97 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 14 15 16 17 18 19 20 21 22 23 24 25 26 27
    property var externalQbsDefines: project.useExternalQbs
                                     ? ['QBS_BUILD_DIR="' + project.qbs_build_dir +'"'] : []
    property var externalQbsIncludes: project.useExternalQbs ? [project.qbs_source_dir + "/src/lib"] : []
    property var externalQbsLibraryPaths: project.useExternalQbs ? [project.qbs_build_dir + "/lib"] : []
    property var externalQbsRPaths: project.useExternalQbs ? [project.qbs_build_dir + "/lib"] : []
    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
28

29
    condition: project.useExternalQbs || project.qbsSubModuleExists
Tobias Hunger's avatar
Tobias Hunger committed
30 31 32 33 34 35 36 37

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

    cpp.defines: base.concat([
        'QML_BUILD_STATIC_LIB'
46 47 48 49 50
    ]).concat(externalQbsDefines)
    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
51 52

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