Files
giesCANne/mqtt/qmqtt.qbs
Collin Kidder ee287eac4b Add two new external libraries. SimpleCrypt is used to encrypt passwords, QMQTT is an MQTT
library that I was able to integrate into the codebase so there aren't any external
dependencies. Both external projects have their own open source licenses. Those licenses
are included. Also in this commit is some preliminary work to start adding MQTT support to SavvyCAN.
2020-08-05 20:24:02 -04:00

135 lines
2.9 KiB
QML

import qbs
import qbs.TextFile
import qbs.FileInfo
Product {
name: "qmqtt"
type: [libraryType]
property bool webSocketSupport: false
property string libraryType: "dynamiclibrary"
targetName: "qmqtt"
version: "1.0.0"
cpp.defines: [
"QT_BUILD_QMQTT_LIB",
"QT_NO_CAST_TO_ASCII",
"QT_NO_CAST_FROM_ASCII",
]
cpp.includePaths: sourceDirectory
files: [
"*.cpp"
]
Group {
name: "Public Headers"
fileTags: [
"hpp",
"public_headers"
]
files: [
"*.h"
]
excludeFiles: privateHeaders.files
}
Group {
id: privateHeaders
name: "Private Headers"
fileTags: [
"hpp",
"private_headers",
]
files: [
"*_p.h"
]
}
Group {
fileTagsFilter: libraryType
qbs.install: true
qbs.installDir: "lib"
}
Group {
fileTagsFilter: "public_headers"
qbs.install: true
qbs.installDir: FileInfo.joinPaths("include", product.name)
}
Group {
fileTagsFilter: "private_headers"
qbs.install: true
qbs.installDir: FileInfo.joinPaths("include", product.name, version, product.name)
}
Group {
fileTagsFilter: "Exporter.qbs.module"
qbs.installDir: FileInfo.joinPaths("qbs", "modules", product.name, "private")
qbs.install: true
}
Group {
fileTagsFilter: "Exporter.pkgconfig.pc"
qbs.installDir: FileInfo.joinPaths("lib" ,"pkgconfig")
qbs.install: true
}
Depends {
name: "cpp"
}
Depends {
name: "Qt"
property var baseModules: ["core", "network"]
Properties {
condition: webSocketSupport
submodules: baseModules.concat(["websockets"])
}
Properties {
condition: !webSocketSupport
submodules: baseModules
}
}
Depends {
name: "Exporter.qbs"
}
Depends {
name: "Exporter.pkgconfig"
}
Export {
Depends {
name: "cpp"
}
Depends {
name: "Qt"
property var baseModules: ["core", "network"]
Properties {
condition: product.webSocketSupport
submodules: baseModules.concat(["websockets"])
}
Properties {
condition: !product.webSocketSupport
submodules: baseModules
}
}
cpp.includePaths: [
product.sourceDirectory,
FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, "include"),
]
prefixMapping: [
{
prefix: product.sourceDirectory,
replacement: FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, "include",
product.name)
}
]
}
}