Commit 2a19b59f authored by Alberto Mardegan's avatar Alberto Mardegan

Build: add QBS files

parent a0e89809
import qbs 1.0
DynamicLibrary {
name: "Mappero"
cpp.allowUnresolvedSymbols: false
cpp.defines: [
'PLUGIN_QML_DIR="' + project.pluginDir + '"',
]
cpp.cxxLanguageVersion: "c++11"
files: [
"gpx.cpp",
"gpx.h",
"kml.cpp",
"kml.h",
"model-aggregator.cpp",
"model-aggregator.h",
"path-builder.cpp",
"path-builder.h",
"path.cpp",
"path.h",
"plugin.cpp",
"plugin.h",
"poi-model.cpp",
"poi-model.h",
"projection.cpp",
"projection.h",
"routing-model.cpp",
"routing-model.h",
"routing-plugin.cpp",
"routing-plugin.h",
"search-plugin.cpp",
"search-plugin.h",
"types.cpp",
"types.h",
]
Group {
name: "qml files"
prefix: "qml/"
files: [
"BaseRouteDelegate.qml",
"BaseWayPointDelegate.qml",
"DefaultResultsDelegate.qml",
"DefaultRouteDelegate.qml",
"DefaultWayPointDelegate.qml",
"libmappero.qrc",
"qmldir",
]
}
Depends { name: "cpp" }
Depends { name: "Qt.gui" }
Depends { name: "Qt.qml" }
Group {
fileTagsFilter: "dynamiclibrary"
qbs.install: true
qbs.installDir: "lib"
}
Export {
Depends { name: "cpp" }
cpp.includePaths: [product.sourceDirectory + '/..']
cpp.libraryPaths: [product.buildDirectory]
}
}
import qbs 1.0
DynamicLibrary {
name: "MapperoUi"
cpp.allowUnresolvedSymbols: false
cpp.cxxLanguageVersion: "c++11"
files: [
"types.cpp",
"types.h",
]
Group {
name: "qml files"
prefix: "qml/"
files: [
"BusyIndicator.qml",
"Button.qml",
"ButtonWithIcon.qml",
"ImageButton.qml",
"LabelLayout.qml",
"ListBrowser.qml",
"MenuButton.qml",
"OsmButton.qml",
"Pane.qml",
"PaneBackground.qml",
"Popup.qml",
"Selector.qml",
"SelectorView.qml",
"SimpleSelector.qml",
"TextField.qml",
"UIConstants.js",
"mappero-ui.qrc",
"qmldir",
]
}
Depends { name: "cpp" }
Depends { name: "Qt.quick" }
Group {
fileTagsFilter: "dynamiclibrary"
qbs.install: true
qbs.installDir: "lib"
}
}
import qbs 1.0
Project {
name: "mappero"
property string version: "1.5"
property bool buildTests: false
property bool enableCoverage: false
property string pluginDir: "share/mappero/qml-plugins"
property string pluginManifestDir: "share/mappero/plugins"
qbsSearchPaths: "qbs"
references: [
"lib/Mappero/Mappero.qbs",
"lib/MapperoUi/MapperoUi.qbs",
"src/qt/qt.qbs",
"src/plugins/google/plugin.qbs",
"src/plugins/google-directions/plugin.qbs",
"src/plugins/nominatim/plugin.qbs",
"src/plugins/reittiopas/plugin.qbs",
"tests/tests.qbs",
]
AutotestRunner { name: "check" }
}
import qbs 1.0
Product {
type: "qmlplugin"
FileTagger {
patterns: "*.manifest"
fileTags: "manifest"
}
FileTagger {
patterns: [ "*.png", "*.gif", "*.svg" ]
fileTags: "image"
}
FileTagger {
patterns: "*.qml"
fileTags: "qml"
}
Group {
fileTagsFilter: "manifest"
qbs.install: true
qbs.installDir: project.pluginManifestDir
}
Group {
fileTagsFilter: [ "qml", "image" ]
qbs.install: true
qbs.installDir: project.pluginDir
qbs.installSourceBase: "../"
}
}
import qbs
Product {
id: product
files: ["**"]
type: ["application", "autotest"]
cpp.cxxFlags: {
if (project.enableCoverage) {
return ["--coverage"]
}
}
cpp.cxxLanguageVersion: "c++11"
cpp.debugInformation: true
cpp.dynamicLibraries: project.enableCoverage ? ["gcov"] : undefined
Depends { name: 'cpp' }
Depends { name: 'Qt.core' }
Depends { name: 'Qt.gui' }
Depends { name: 'Qt.test' }
}
import qbs 1.0
QmlPlugin {
name: "google-directions"
files: [
"Routing.qml",
"google-directions.manifest",
"google-search.png",
]
}
import qbs 1.0
QmlPlugin {
name: "google"
files: [
"Model.qml",
"google-search.png",
"google.manifest",
]
}
import qbs 1.0
QmlPlugin {
name: "nominatim"
files: [
"Model.qml",
"nominatim.gif",
"nominatim.manifest",
]
}
import qbs 1.0
QmlPlugin {
name: "reittiopas"
files: [
"Routing.qml",
"Options.qml",
"reittiopas.manifest",
"reittiopas.png",
]
}
import qbs 1.0
QtGuiApplication {
name: "mappero"
cpp.defines: [
'MAPPERO_VERSION="' + project.version + '"',
'PLUGIN_MANIFEST_DIR="' + project.pluginManifestDir + '"',
]
cpp.cxxLanguageVersion: "c++11"
files: [
"configuration.cpp",
"configuration.h",
"controller.cpp",
"controller.h",
"gps.cpp",
"gps.h",
"layer.cpp",
"layer.h",
"main.cpp",
"map.cpp",
"map.h",
"map-object.cpp",
"map-object.h",
"mark.cpp",
"mark.h",
"path-item.cpp",
"path-item.h",
"path-layer.cpp",
"path-layer.h",
"plugin-manager.cpp",
"plugin-manager.h",
"plugin-model.cpp",
"plugin-model.h",
"poi-item.cpp",
"poi-item.h",
"poi-view.cpp",
"poi-view.h",
"tile-cache.cpp",
"tile-cache.h",
"tile-download.cpp",
"tile-download.h",
"tile.cpp",
"tile.h",
"tiled-layer.cpp",
"tiled-layer.h",
"tracker.cpp",
"tracker.h",
"types.cpp",
"types.h",
"view.cpp",
"view.h",
"../../data/icons/scalable/icons.qrc",
]
Group {
name: "geotagger"
condition: exiv2.present
files: [
"taggable-area.cpp",
"taggable-area.h",
"taggable-selection.cpp",
"taggable-selection.h",
"taggable.cpp",
"taggable.h",
"ticks.cpp",
"ticks.h",
"qml/geotag.qrc",
"../../data/icons/scalable/icons-geotag.qrc",
]
}
Group {
name: "qml files"
prefix: "qml/"
files: [
"qml.qrc",
"qmldir",
]
}
Depends { name: "cpp" }
Depends { name: "Qt.quick" }
Depends { name: "Mappero" }
Depends { name: "MapperoUi" }
Depends {
name: "exiv2"
required: false
}
Depends { name: "Qt.concurrent"; condition: exiv2.present }
Properties {
condition: exiv2.present
overrideListProperties: false
cpp.defines: outer.concat([
'GEOTAGGING_ENABLED',
])
}
Group {
fileTagsFilter: "application"
qbs.install: true
qbs.installDir: "bin"
}
}
import qbs 1.0
Test {
name: "path-test"
files: [
"path-test.cpp",
"path-test.h",
"paths.qrc",
]
Depends { name: "Mappero" }
cpp.rpaths: cpp.libraryPaths
}
import qbs 1.0
Project {
condition: project.buildTests
references: [
"path/path.qbs",
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment