Commit 67ed353c authored by Michal Policht's avatar Michal Policht

Improve handling of include and library paths.

parent e6247d33
......@@ -10,6 +10,10 @@ CommonProduct {
baseName: name
cpp.includePaths: [cutehmi.dirs.externalIncludeDir]
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
property string installDir: FileInfo.relativePath(path + "/../../..", sourceDirectory)
FileTagger {
......@@ -44,6 +48,8 @@ CommonProduct {
qbs.installSourceBase: sourceDirectory
qbs.installDir: installDir
}
Depends { name: "cutehmi.dirs" }
}
//(c)MP: Copyright © 2019, Michal Policht. All rights reserved.
......
......@@ -23,7 +23,9 @@ CommonProduct {
return base.concat(defines)
}
cpp.includePaths: [product.sourceDirectory + "/include"]
cpp.includePaths: [product.sourceDirectory + "/include", cutehmi.dirs.externalIncludeDir]
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
property string installDir: cutehmi.dirs.extensionInstallDirname + "/" + FileInfo.relativePath(cutehmi.dirs.extensionsSourceDir, sourceDirectory)
......@@ -48,8 +50,6 @@ CommonProduct {
cpp.includePaths: [product.sourceDirectory + "/include"]
cpp.libraryPaths: if (product.cpp.libraryPaths) product.cpp.libraryPaths
Depends { name: "cpp" }
}
......
......@@ -13,7 +13,9 @@ CommonProduct {
cpp.defines: base.concat([baseName.toUpperCase() + "_BUILD"])
cpp.includePaths: [product.sourceDirectory + "/include"]
cpp.includePaths: [product.sourceDirectory + "/include", cutehmi.dirs.externalIncludeDir]
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
Properties {
condition: !project.staticModules
......
......@@ -14,6 +14,10 @@ CommonProduct {
major: isNaN(name.substr(name.lastIndexOf(".", name.length - 1) + 1)) ? 1 : Number(name.substr(name.lastIndexOf(".", name.length - 1) + 1))
cpp.includePaths: [cutehmi.dirs.externalIncludeDir]
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
property string installDir: cutehmi.dirs.qmlExtensionInstallDirname + "/" + FileInfo.relativePath(cutehmi.dirs.qmlSourceDir, sourceDirectory)
property stringList qmlImportPaths: [qbs.installRoot + "/" + cutehmi.dirs.qmlExtensionInstallDirname] // QML import paths for QtCreator.
......
......@@ -13,6 +13,10 @@ CommonProduct {
condition: project.buildTests
cpp.includePaths: [cutehmi.dirs.externalIncludeDir]
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
property string testName
property string testNamePrefix
......
......@@ -11,6 +11,10 @@ CommonProduct {
baseName: name
cpp.includePaths: [cutehmi.dirs.externalIncludeDir]
cpp.libraryPaths: [cutehmi.dirs.externalLibDir]
Properties {
condition: qbs.targetOS.contains("linux")
cpp.linkerFlags: "-rpath=$ORIGIN"
......
......@@ -3,10 +3,6 @@ import qbs.Probes
import qbs.FileInfo
Module {
cpp.libraryPaths: FileInfo.cleanPath(libiconvProbe.path)
cpp.includePaths: FileInfo.cleanPath(iconvHeaderProbe.path)
property bool found: libiconvProbe.found && iconvHeaderProbe.found
property bool available: found
......
......@@ -6,10 +6,6 @@ import qbs.FileInfo
Library for native language support (part of gettext).
*/
Module {
cpp.libraryPaths: FileInfo.cleanPath(libintlProbe.path)
cpp.includePaths: FileInfo.cleanPath(libintlHeaderProbe.path)
property bool found: libintlProbe.found && libintlHeaderProbe.found
property bool available: found && cutehmi.libiconv.available
......
......@@ -3,10 +3,6 @@ import qbs.Probes
import qbs.FileInfo
Module {
cpp.libraryPaths: FileInfo.cleanPath(libmodbusProbe.path)
cpp.includePaths: FileInfo.cleanPath(modbusHeaderProbe.path)
property bool found: libmodbusProbe.found && modbusHeaderProbe.found
property bool available: found
......
......@@ -4,10 +4,6 @@ import qbs.FileInfo
import qbs.Environment
Module {
cpp.libraryPaths: FileInfo.cleanPath(libpqProbe.path)
cpp.includePaths: FileInfo.cleanPath(libpq_feHeaderProbe.path)
property bool found: libpqProbe.found && libpq_feHeaderProbe.found
property bool available: found && (qbs.targetOS.contains("windows") ? cutehmi.libintl.available : true)
......
......@@ -3,10 +3,6 @@ import qbs.Probes
import qbs.FileInfo
Module {
cpp.libraryPaths: FileInfo.cleanPath(libsshProbe.path)
cpp.includePaths: FileInfo.cleanPath(libsshHeaderProbe.path)
property bool found: libsshProbe.found && libsshHeaderProbe.found
property bool available: found && (qbs.targetOS.contains("windows") ? cutehmi.zlib.available && cutehmi.libgcrypt.available : true)
......
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