From 8c38cb903afda2c2fe44c5c25b743ff9a018f246 Mon Sep 17 00:00:00 2001 From: stefled Date: Fri, 1 Dec 2023 13:43:51 +0100 Subject: [PATCH] fix[conanv2] : add /* on conan options when generates conanfile.txt, only if not exist in packagedependencies.txt --- packagedependencies-parser.pri | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packagedependencies-parser.pri b/packagedependencies-parser.pri index 13c69ea..1f28863 100644 --- a/packagedependencies-parser.pri +++ b/packagedependencies-parser.pri @@ -227,7 +227,11 @@ for(depfile, packagedepsfiles) { remakenConanOptions += $${pkg.name}:shared=$${sharedLinkMode} } else { - remakenConanOptions += $${pkg.name}/*:shared=$${sharedLinkMode} + equals(pkg.name, $$replace(pkg.name, "/*","")) { + remakenConanOptions += $${pkg.name}/*:shared=$${sharedLinkMode} + } else { + remakenConanOptions += $${pkg.name}:shared=$${sharedLinkMode} + } } } conanOptions = $$split(pkg.toolOptions, $$LITERAL_HASH) @@ -239,7 +243,11 @@ for(depfile, packagedepsfiles) { remakenConanOptions += $${pkg.name}:$$replace(conanOption, "\"","") } else { - remakenConanOptions += $${pkg.name}/*:$$replace(conanOption, "\"","") + equals(pkg.name, $$replace(pkg.name, "/*","")) { + remakenConanOptions += $${pkg.name}/*:$$replace(conanOption, "\"","") + } else { + remakenConanOptions += $${pkg.name}:$$replace(conanOption, "\"","") + } } } else { @@ -248,7 +256,11 @@ for(depfile, packagedepsfiles) { } else { conanOptionPkgOption = $$member(conanOptionInfo,0) - remakenConanOptions += $${conanOptionPrefix}/*:$$replace(conanOptionPkgOption, "\"","") + equals(conanOptionPrefix, $$replace(conanOptionPrefix, "/*","")) { + remakenConanOptions += $${conanOptionPrefix}/*:$$replace(conanOptionPkgOption, "\"","") + } else { + remakenConanOptions += $${conanOptionPrefix}:$$replace(conanOptionPkgOption, "\"","") + } } } }