qbsprojectmanager.qbs 2.49 KB
Newer Older
Tobias Hunger's avatar
Tobias Hunger committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import qbs.base 1.0

import "../QtcPlugin.qbs" as QtcPlugin

QtcPlugin {
    name: "QbsProjectManager"

    property var qbs_source_dir: qbs.getenv("QBS_SOURCE_DIR")
    property var qbs_build_dir: qbs.getenv("QBS_BUILD_DIR")

    condition: qbs_source_dir !== undefined && qbs_build_dir !== undefined

    Depends { name: "Qt"; submodules: [ "widgets", "script" ] }
    Depends { name: "ProjectExplorer" }
    Depends { name: "Core" }
    Depends { name: "CppTools" }
    Depends { name: "TextEditor" }
    Depends { name: "QtSupport" }
    Depends { name: "QmlJS" }
20
    Depends { name: "QmlJSTools" }
Tobias Hunger's avatar
Tobias Hunger committed
21 22 23 24 25 26 27 28 29 30 31 32 33


    cpp.includePaths: base.concat([
        qbs_source_dir + "/src",
        qbs_source_dir + "/src/lib",
    ])

    cpp.defines: base.concat([
        'QBS_SOURCE_DIR="' + qbs_source_dir + '"',
        'QBS_BUILD_DIR="' + qbs_build_dir +'"',
        'QML_BUILD_STATIC_LIB'
    ])

34
    cpp.libraryPaths: base.concat([qbs_build_dir + "/lib"])
35
    cpp.rpaths: base.concat([qbs_build_dir + "/lib"])
Tobias Hunger's avatar
Tobias Hunger committed
36
    cpp.dynamicLibraries: {
37
        var libs = []
Joerg Bornemann's avatar
Joerg Bornemann committed
38
        if (qbs.targetOS.contains("windows")) {
39 40 41 42 43 44 45
            libs.push("shell32")
            if (qbs.enableDebugCode)
                libs.push("qbscored")
            else
                libs.push("qbscore")
        } else {
            libs.push("qbscore")
Tobias Hunger's avatar
Tobias Hunger committed
46
        }
47
        return libs
Tobias Hunger's avatar
Tobias Hunger committed
48 49 50 51 52 53 54 55 56 57 58 59 60
    }

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