Setup rpaths only for dynamic libraries.
Property to disable the use of rpath.
This commit is contained in:
parent
11642ebfe1
commit
2221a35e7b
|
@ -10,11 +10,15 @@ CppApplication {
|
||||||
cpp.minimumMacosVersion: buildconfig.minimumMacosVersion
|
cpp.minimumMacosVersion: buildconfig.minimumMacosVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
cpp.rpaths: FileInfo.joinPaths(cpp.rpathOrigin,
|
Properties {
|
||||||
"..",
|
condition: buildconfig.enableRPath
|
||||||
qbs.targetOS.contains("macos")
|
cpp.rpaths: FileInfo.joinPaths(cpp.rpathOrigin,
|
||||||
? "Frameworks"
|
"..",
|
||||||
: buildconfig.installLibraryPath)
|
qbs.targetOS.contains("macos")
|
||||||
|
? "Frameworks"
|
||||||
|
: buildconfig.installLibraryPath)
|
||||||
|
}
|
||||||
|
|
||||||
install: true
|
install: true
|
||||||
installDir: buildconfig.installAppPath
|
installDir: buildconfig.installAppPath
|
||||||
installDebugInformation: true
|
installDebugInformation: true
|
||||||
|
|
|
@ -10,8 +10,14 @@ Library {
|
||||||
buildconfig.appTarget: "valentina"
|
buildconfig.appTarget: "valentina"
|
||||||
bundle.isBundle: buildconfig.frameworksBuild
|
bundle.isBundle: buildconfig.frameworksBuild
|
||||||
cpp.includePaths: [".."]
|
cpp.includePaths: [".."]
|
||||||
cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined
|
|
||||||
cpp.rpaths: cpp.rpathOrigin
|
// Allow MAC OS X to find library inside a bundle
|
||||||
|
cpp.sonamePrefix: (!buildconfig.staticBuild && qbs.targetOS.contains("macos")) ? "@rpath" : undefined
|
||||||
|
|
||||||
|
Properties {
|
||||||
|
condition: (!buildconfig.staticBuild && buildconfig.enableRPath)
|
||||||
|
cpp.rpaths: cpp.rpathOrigin
|
||||||
|
}
|
||||||
|
|
||||||
install: !buildconfig.staticBuild
|
install: !buildconfig.staticBuild
|
||||||
installDir: buildconfig.installLibraryPath
|
installDir: buildconfig.installLibraryPath
|
||||||
|
|
|
@ -12,6 +12,10 @@ Module {
|
||||||
// Use this property to disable building unit tests.
|
// Use this property to disable building unit tests.
|
||||||
property bool enableUnitTests: true
|
property bool enableUnitTests: true
|
||||||
|
|
||||||
|
// Use this property to disable the use of rpath. This can be used when packaging Valentina for distributions which
|
||||||
|
// do not permit the use of rpath, such as Fedora.
|
||||||
|
property bool enableRPath: true
|
||||||
|
|
||||||
property string libDirName: "lib"
|
property string libDirName: "lib"
|
||||||
|
|
||||||
property string appTarget
|
property string appTarget
|
||||||
|
|
Loading…
Reference in New Issue
Block a user