aboutsummaryrefslogtreecommitdiffstats
path: root/qbs/imports/QtcAutotest.qbs
blob: 0bd37a905b23018b5645117de02a25bc5411694b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import qbs
import qbs.FileInfo
import QtcProduct

QtcProduct {
    type: "application"
    Depends { name: "Qt.test" }
    Depends { name: "copyable_resource" }
    targetName: "tst_" + name.split(' ').join("")

    // This needs to be absolute, because it is passed to one of the source files.
    destinationDirectory: project.buildDirectory + '/'
                          + FileInfo.relativePath(project.ide_source_tree, sourceDirectory)

    cpp.rpaths: [
        project.buildDirectory + '/' + project.ide_library_path,
        project.buildDirectory + '/' + project.ide_library_path + "/..", // OSX
        project.buildDirectory + '/' + project.ide_plugin_path
    ]
    cpp.minimumOsxVersion: "10.7"
    cpp.defines: base.filter(function(d) { return d != "QT_NO_CAST_FROM_ASCII"; })

    Group {
        fileTagsFilter: product.type
        qbs.install: false
    }

    // The following would be conceptually right, but does not work currently as some autotests
    // (e.g. extensionsystem) do not work when installed, because they want hardcoded
    // absolute paths to resources in the build directory.
    //    cpp.rpaths: qbs.targetOS.contains("osx")
    //            ? ["@executable_path/.."]
    //            : ["$ORIGIN/../" + project.libDirName + "/qtcreator",
    //               "$ORIGIN/../" project.libDirName + "/qtcreator/plugins"]
}