<commit_before>import qbs
import qbs.FileInfo

QbsProduct {
    Depends { name: "cpp" }
    version: qbsversion.version
    type: Qt.core.staticBuild ? "staticlibrary" : "dynamiclibrary"
    targetName: (qbs.enableDebugCode && qbs.targetOS.contains("windows")) ? (name + 'd') : name
    destinationDirectory: FileInfo.joinPaths(project.buildDirectory,
        qbs.targetOS.contains("windows") ? "bin" : qbsbuildconfig.libDirName)
    cpp.defines: base.concat(visibilityType === "static" ? ["QBS_STATIC_LIB"] : ["QBS_LIBRARY"])
    cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined
    Properties {
        condition: qbs.toolchain.contains("gcc")
        cpp.soVersion: version.replace(/\.\d+$/, '')
    }
    cpp.visibility: "minimal"
    cpp.cxxLanguageVersion: "c++11"
    property bool visibilityType: Qt.core.staticBuild ? "static" : "dynamic"
    property string headerInstallPrefix: "/include/qbs"
    Group {
        fileTagsFilter: product.type.concat("dynamiclibrary_symlink")
            .concat(qbs.buildVariant === "debug" ? ["debuginfo_dll"] : [])
        qbs.install: install
        qbs.installDir: qbsbuildconfig.libInstallDir
        qbs.installSourceBase: destinationDirectory
    }
    Group {
        fileTagsFilter: ["dynamiclibrary_import"]
        qbs.install: install
        qbs.installDir: qbsbuildconfig.importLibInstallDir
    }

    Properties {
        condition: qbs.targetOS.contains("darwin")
        bundle.isBundle: false
    }

    Export {
        Depends { name: "cpp" }
        Depends { name: "Qt"; submodules: ["core"] }
        Depends { name: "qbsbuildconfig" }

        cpp.rpaths: qbsbuildconfig.libRPaths
        cpp.includePaths: [product.sourceDirectory]
        cpp.defines: product.visibilityType === "static" ? ["QBS_STATIC_LIB"] : []
    }
}<commit_msg>macOS: set a compatibility version on our shared libraries<commit_after>import qbs
import qbs.FileInfo

QbsProduct {
    Depends { name: "cpp" }
    version: qbsversion.version
    type: Qt.core.staticBuild ? "staticlibrary" : "dynamiclibrary"
    targetName: (qbs.enableDebugCode && qbs.targetOS.contains("windows")) ? (name + 'd') : name
    destinationDirectory: FileInfo.joinPaths(project.buildDirectory,
        qbs.targetOS.contains("windows") ? "bin" : qbsbuildconfig.libDirName)
    cpp.defines: base.concat(visibilityType === "static" ? ["QBS_STATIC_LIB"] : ["QBS_LIBRARY"])
    cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined
    Properties {
        condition: qbs.toolchain.contains("gcc")
        cpp.soVersion: version.replace(/\.\d+$/, '')
    }
    cpp.visibility: "minimal"
    cpp.cxxLanguageVersion: "c++11"
    property bool visibilityType: Qt.core.staticBuild ? "static" : "dynamic"
    property string headerInstallPrefix: "/include/qbs"
    Group {
        fileTagsFilter: product.type.concat("dynamiclibrary_symlink")
            .concat(qbs.buildVariant === "debug" ? ["debuginfo_dll"] : [])
        qbs.install: install
        qbs.installDir: qbsbuildconfig.libInstallDir
        qbs.installSourceBase: destinationDirectory
    }
    Group {
        fileTagsFilter: ["dynamiclibrary_import"]
        qbs.install: install
        qbs.installDir: qbsbuildconfig.importLibInstallDir
    }

    Properties {
        condition: qbs.targetOS.contains("darwin")
        bundle.isBundle: false
        cpp.linkerFlags: ["-compatibility_version", cpp.soVersion]
    }

    Export {
        Depends { name: "cpp" }
        Depends { name: "Qt"; submodules: ["core"] }
        Depends { name: "qbsbuildconfig" }

        cpp.rpaths: qbsbuildconfig.libRPaths
        cpp.includePaths: [product.sourceDirectory]
        cpp.defines: product.visibilityType === "static" ? ["QBS_STATIC_LIB"] : []
    }
}
{'fraction_non_alphanumeric': 0.1310344827586207, 'fraction_numerical': 0.0010610079575596816, 'mean_word_length': 3.21340782122905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7540831', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1144, 'n_words': 205}