Skip to content

Commit

Permalink
Qbs: Tweaks
Browse files Browse the repository at this point in the history
* Export needed include dir and defines from karchive product

* Require Qt 5.12 for RpMap plugin and automatically disable it for
  older versions
  • Loading branch information
bjorn committed Nov 11, 2020
1 parent 28c9ec5 commit faf5a79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 7 additions & 3 deletions src/karchive/karchive.qbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import qbs 1.0

StaticLibrary {
targetName: "KArchive"

Depends { name: "cpp" }
Depends { name: "Qt"; submodules: "gui"; versionAtLeast: "5.6" }
Depends { name: "Qt.core"; versionAtLeast: "5.12" }

cpp.includePaths: [ "src" ]
cpp.defines: [ "KARCHIVE_STATIC_DEFINE" ]
Expand Down Expand Up @@ -49,4 +47,10 @@ StaticLibrary {
"src/loggingcategory.cpp",
"src/loggingcategory.h",
]

Export {
Depends { name: "cpp" }
cpp.includePaths: "src"
cpp.defines: [ "KARCHIVE_STATIC_DEFINE" ]
}
}
16 changes: 6 additions & 10 deletions src/plugins/rpmap/rpmap.qbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import qbs 1.0

TiledPlugin {
cpp.defines: base.concat(["RPMAP_LIBRARY", "KARCHIVE_STATIC_DEFINE"])
cpp.includePaths: ["../../KArchive/src"]
condition: Qt.core.versionMinor >= 12

Depends { name: "Qt.core" }
Depends { name: "karchive" }

cpp.defines: base.concat(["RPMAP_LIBRARY"])

Properties {
condition: !qbs.toolchain.contains("msvc")
cpp.dynamicLibraries: base.concat(["z"])
}

Properties {
condition: qbs.targetOS.contains("darwin")
bundle.isBundle: false
cpp.sonamePrefix: "@rpath"
}

Depends { name: "KArchive" }

files: [
"rpmap_global.h",
"rpmapplugin.cpp",
Expand Down

0 comments on commit faf5a79

Please sign in to comment.