QtcAutotest.qbs 1.33 KB
Newer Older
1 2
import qbs
import qbs.FileInfo
3
import QtcProduct
4

5
QtcProduct {
6 7
    type: "application"
    Depends { name: "Qt.test" }
8
    Depends { name: "copyable_resource" }
9 10 11
    targetName: "tst_" + name.split(' ').join("")

    // This needs to be absolute, because it is passed to one of the source files.
Christian Kandeler's avatar
Christian Kandeler committed
12
    destinationDirectory: project.buildDirectory + '/'
13 14 15
                          + FileInfo.relativePath(project.ide_source_tree, sourceDirectory)

    cpp.rpaths: [
Christian Kandeler's avatar
Christian Kandeler committed
16 17 18
        project.buildDirectory + '/' + project.ide_library_path,
        project.buildDirectory + '/' + project.ide_library_path + "/..", // OSX
        project.buildDirectory + '/' + project.ide_plugin_path
19
    ]
20
    cpp.minimumOsxVersion: "10.7"
Christian Kandeler's avatar
Christian Kandeler committed
21
    cpp.defines: base.filter(function(d) { return d != "QT_NO_CAST_FROM_ASCII"; })
22

23 24 25 26 27
    Group {
        fileTagsFilter: product.type
        qbs.install: false
    }

28 29 30
    // 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.
31 32 33 34
    //    cpp.rpaths: qbs.targetOS.contains("osx")
    //            ? ["@executable_path/.."]
    //            : ["$ORIGIN/../" + project.libDirName + "/qtcreator",
    //               "$ORIGIN/../" project.libDirName + "/qtcreator/plugins"]
35
}