diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-06-08 14:55:29 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-06-08 15:13:47 +0200 |
commit | 073fda0ab536b5610ff1b9191db582791552509e (patch) | |
tree | 16f0bbacc116e93778e9490ba2c2d9efff738d35 /tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs | |
parent | 9349866b37118db9179d1f0689e872ca1260f040 (diff) | |
parent | 5f71b2220f9ff6838799c407972309bff1e8fc96 (diff) |
Merge 1.12 into master
Change-Id: I0c914674c0728a7f7bc70fd9608914b95ef55a30
Diffstat (limited to 'tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs')
-rw-r--r-- | tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs new file mode 100644 index 000000000..674f78c94 --- /dev/null +++ b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs @@ -0,0 +1,124 @@ +import qbs +import qbs.FileInfo + +Project { + Product { + name: "dummy" + Export { Depends { name: "TheFirstLib" } } + } + + Product { + name: "SomeHelper" + Depends { name: "Exporter.pkgconfig" } + Exporter.pkgconfig.versionEntry: "1.0" + } + StaticLibrary { + Depends { name: "cpp" } + name: "BoringStaticLib" + files: ["boringstaticlib.cpp"] + Export { + Depends { name: "cpp" } + cpp.defines: ["HAVE_INDUSTRIAL_STRENGTH_HAIR_DRYER"] + } + } + DynamicLibrary { + name: "TheFirstLib" + version: "1.0" + + Depends { name: "SomeHelper" } + Depends { name: "Exporter.pkgconfig" } + Exporter.pkgconfig.excludedDependencies: ["Qt.core", "helper3"] + Exporter.pkgconfig.requiresEntry: "Qt5Core" + Exporter.pkgconfig.urlEntry: "http://www.example.com/thefirstlib" + + Depends { name: "cpp" } + cpp.defines: ["FIRSTLIB"] + + qbs.installPrefix: "/opt/the firstlib" + + Export { + prefixMapping: [{prefix: "/somedir", replacement: "/otherdir"}] + Depends { name: "BoringStaticLib" } + Depends { name: "cpp" } + Depends { name: "Qt.core"; required: false } + Depends { name: "helper1" } + Depends { name: "helper3" } + property bool someCondition: qbs.hostOS.contains("windows") // hostOS for easier testing + property bool someOtherCondition: someCondition + Properties { + condition: !someOtherCondition + cpp.driverFlags: ["-pthread"] + } + cpp.defines: product.name + cpp.includePaths: [FileInfo.joinPaths(product.qbs.installPrefix, "include")] + Qt.core.mocName: "muck" + } + + Group { + fileTagsFilter: ["dynamiclibrary", "dynamiclibrary_import"] + qbs.install: true + qbs.installDir: "lib" + } + + Group { + name: "api_headers" + files: ["firstlib.h"] + qbs.install: true + qbs.installDir: "include" + } + + files: ["firstlib.cpp"] + } + DynamicLibrary { + name: "TheSecondLib" + version: "2.0" + + Depends { name: "Exporter.pkgconfig" } + Exporter.pkgconfig.descriptionEntry: "The second lib" + Exporter.pkgconfig.transformFunction: (function(product, moduleName, propertyName, value) { + if (moduleName === "cpp" && propertyName === "includePaths") + return value.filter(function(p) { return p !== product.sourceDirectory; }); + return value; + }) + Exporter.pkgconfig.customVariables: ({config1: "a b", config2: "c"}) + + Depends { name: "cpp" } + cpp.defines: ["SECONDLIB"] + + qbs.installPrefix: "" + + Depends { name: "TheFirstLib" } + + Export { + Depends { name: "TheFirstLib" } + Depends { name: "dummy" } + Depends { name: "cpp" } + cpp.includePaths: ["/opt/thesecondlib/include", product.sourceDirectory] + property string hurz: importingProduct.name + + Rule { + property int n: 5 + Artifact { + filePath: "dummy" + fileTags: ["d1", "d2"] + cpp.warningsAreErrors: true + } + } + } + + Group { + fileTagsFilter: ["dynamiclibrary", "dynamiclibrary_import"] + qbs.install: true + qbs.installDir: "/opt/thesecondlib/lib" + } + + Group { + name: "api_headers" + files: ["secondlib.h"] + qbs.install: true + qbs.installDir: "/opt/thesecondlib/include" + } + + files: ["secondlib.cpp"] + } +} |