QtcAutotest.qbs 1.33 KB
Newer Older
1 2
import qbs
import qbs.FileInfo
3
import QtcFunctions
4 5 6 7 8 9 10 11 12 13

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

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

14
    cpp.cxxFlags: QtcFunctions.commonCxxFlags(qbs)
Christian Kandeler's avatar
Christian Kandeler committed
15
    cpp.linkerFlags: QtcFunctions.commonLinkerFlags(qbs)
16 17 18
    cpp.rpaths: [
        buildDirectory + '/' + project.ide_library_path,
        buildDirectory + '/' + project.ide_library_path + "/..", // OSX
Orgad Shaneh's avatar
Orgad Shaneh committed
19
        buildDirectory + '/' + project.ide_plugin_path
20
    ]
21
    cpp.minimumOsxVersion: "10.7"
22 23 24 25 26 27

    // 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/.."]
28
//            : ["$ORIGIN/../" + project.libDirName + "/qtcreator",
Orgad Shaneh's avatar
Orgad Shaneh committed
29
//               "$ORIGIN/../" project.libDirName + "/qtcreator/plugins"]
30 31 32 33 34 35
//    Group {
//        fileTagsFilter: product.type
//        qbs.install: true
//        qbs.installDir: project.ide_bin_path
//    }
}