qbsprojectmanager.qbs 3.56 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
    Depends { name: "QmlJS" }
    Depends { name: "Utils" }

    Depends { name: "ProjectExplorer" }
    Depends { name: "Core" }
    Depends { name: "CppTools" }
44
    Depends { name: "ResourceEditor" }
45 46
    Depends { name: "QtSupport" }
    Depends { name: "QmlJSTools" }
Tobias Hunger's avatar
Tobias Hunger committed
47 48

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

    files: [
62 63 64
        "customqbspropertiesdialog.h",
        "customqbspropertiesdialog.cpp",
        "customqbspropertiesdialog.ui",
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 72 73 74 75 76 77
        "qbsbuildconfiguration.cpp",
        "qbsbuildconfiguration.h",
        "qbsbuildconfigurationwidget.cpp",
        "qbsbuildconfigurationwidget.h",
        "qbsbuildstep.cpp",
        "qbsbuildstep.h",
        "qbsbuildstepconfigwidget.ui",
        "qbscleanstep.cpp",
        "qbscleanstep.h",
        "qbscleanstepconfigwidget.ui",
78
        "qbsconstants.h",
79 80
        "qbsdeployconfigurationfactory.cpp",
        "qbsdeployconfigurationfactory.h",
81 82 83
        "qbsinfopage.cpp",
        "qbsinfopage.h",
        "qbsinfowidget.ui",
Tobias Hunger's avatar
Tobias Hunger committed
84 85 86
        "qbsinstallstep.cpp",
        "qbsinstallstep.h",
        "qbsinstallstepconfigwidget.ui",
Tobias Hunger's avatar
Tobias Hunger committed
87 88 89 90 91 92
        "qbslogsink.cpp",
        "qbslogsink.h",
        "qbsnodes.cpp",
        "qbsnodes.h",
        "qbsparser.cpp",
        "qbsparser.h",
93 94 95
        "qbsprofilessettingspage.cpp",
        "qbsprofilessettingspage.h",
        "qbsprofilessettingswidget.ui",
Tobias Hunger's avatar
Tobias Hunger committed
96 97 98 99 100 101
        "qbsproject.cpp",
        "qbsproject.h",
        "qbsprojectfile.cpp",
        "qbsprojectfile.h",
        "qbsprojectmanager.cpp",
        "qbsprojectmanager.h",
102
        "qbsprojectmanager.qrc",
Tobias Hunger's avatar
Tobias Hunger committed
103 104 105 106
        "qbsprojectmanager_global.h",
        "qbsprojectmanagerconstants.h",
        "qbsprojectmanagerplugin.cpp",
        "qbsprojectmanagerplugin.h",
107 108
        "qbsprojectmanagersettings.cpp",
        "qbsprojectmanagersettings.h",
109 110
        "qbsprojectparser.cpp",
        "qbsprojectparser.h",
Tobias Hunger's avatar
Tobias Hunger committed
111
        "qbsrunconfiguration.cpp",
112
        "qbsrunconfiguration.h",
Tobias Hunger's avatar
Tobias Hunger committed
113 114 115
    ]
}