diff options
-rw-r--r-- | qbs-resources/imports/QbsLibrary.qbs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qbs-resources/imports/QbsLibrary.qbs b/qbs-resources/imports/QbsLibrary.qbs index 5ad01e170..218da8941 100644 --- a/qbs-resources/imports/QbsLibrary.qbs +++ b/qbs-resources/imports/QbsLibrary.qbs @@ -8,13 +8,14 @@ QbsProduct { type: Qt.core.staticBuild ? "staticlibrary" : "dynamiclibrary" targetName: (qbs.enableDebugCode && qbs.targetOS.contains("windows")) ? (name + 'd') : name destinationDirectory: qbs.targetOS.contains("windows") ? "bin" : qbsbuildconfig.libDirName - cpp.defines: base.concat(type == "staticlibrary" ? ["QBS_STATIC_LIB"] : ["QBS_LIBRARY"]) + cpp.defines: base.concat(visibilityType === "static" ? ["QBS_STATIC_LIB"] : ["QBS_LIBRARY"]) cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined // ### Uncomment the following line in 1.8 //cpp.soVersion: version.replace(/\.\d+$/, '') cpp.visibility: "minimal" cpp.cxxLanguageVersion: "c++11" bundle.isBundle: false + property bool visibilityType: Qt.core.staticBuild ? "static" : "dynamic" property string headerInstallPrefix: "/include/qbs" Group { fileTagsFilter: product.type.concat("dynamiclibrary_symlink") @@ -34,6 +35,6 @@ QbsProduct { cpp.rpaths: qbsbuildconfig.libRPaths cpp.includePaths: [product.sourceDirectory] - cpp.defines: product.type === "staticlibrary" ? ["QBS_STATIC_LIB"] : [] + cpp.defines: product.visibilityType === "static" ? ["QBS_STATIC_LIB"] : [] } } |