Enable code signing on mac.

This commit is contained in:
Roman Telezhynskyi 2023-08-18 14:01:03 +03:00
parent 7532800830
commit b67a063665
5 changed files with 14 additions and 0 deletions

View File

@ -8,6 +8,8 @@ CppApplication {
Properties {
condition: qbs.targetOS.contains("macos")
cpp.minimumMacosVersion: buildconfig.minimumMacosVersion
codesign.enableCodeSigning: buildconfig.enableCodeSigning
codesign.codesignFlags: ["--deep"]
}
Properties {

View File

@ -14,6 +14,8 @@ VLib {
Properties {
condition: qbs.targetOS.contains("macos")
bundle.identifierPrefix: 'ua.com.smart-pattern'
codesign.enableCodeSigning: buildconfig.enableCodeSigning
codesign.codesignFlags: ["--deep"]
}
Properties {

View File

@ -45,6 +45,10 @@ Module {
return project.enableConan;
}
readonly property bool enableCodeSigning : {
return project.enableSigning;
}
property string libDirName: "lib"
property string appTarget

View File

@ -32,6 +32,8 @@ Module {
property stringList targetApps: undefined
property string signingIdentity: "-" // ad-hoc
Rule {
// alwaysRun: true
multiplex: true
@ -76,6 +78,9 @@ Module {
if (product.macdeployqt.libpath !== undefined)
cmdArgs.push("-libpath", product.macdeployqt.libpath);
if (product.buildconfig.enableCodeSigning)
cmdArgs.push("-codesign=" + product.macdeployqt.signingIdentity);
if (product.macdeployqt.targetApps !== undefined && !product.buildconfig.enableMultiBundle && product.primaryApp)
{
product.macdeployqt.targetApps.forEach(function(targetApp) {

View File

@ -9,6 +9,7 @@ Project {
property bool enableConan: false
property string minimumMacosVersion: undefined
property stringList conanProfiles: []
property bool enableSigning: true
// Temporary probe until qbs doesn't support conan 2.0
ConanfileProbe {