diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 82c255348f..871b2071fd 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -534,7 +534,10 @@ static QString getRelocatablePrefix() #if defined(QT_STATIC) prefixPath = prefixFromAppDirHelper(); #elif defined(Q_OS_DARWIN) && QT_CONFIG(framework) - auto qtCoreBundle = CFBundleGetBundleWithIdentifier(CFSTR("org.qt-project.QtCore")); +#ifndef QT_LIBINFIX + #define QT_LIBINFIX "" +#endif + auto qtCoreBundle = CFBundleGetBundleWithIdentifier(CFSTR("org.qt-project.QtCore" QT_LIBINFIX)); if (!qtCoreBundle) { // When running Qt apps over Samba shares, CoreFoundation will fail to find // the Resources directory inside the bundle, This directory is a symlink, @@ -547,7 +550,7 @@ static QString getRelocatablePrefix() auto bundle = CFBundleRef(CFArrayGetValueAtIndex(allBundles, i)); auto url = QCFType(CFBundleCopyBundleURL(bundle)); auto path = QCFType(CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle)); - if (CFStringHasSuffix(path, CFSTR("/QtCore.framework"))) { + if (CFStringHasSuffix(path, CFSTR("/QtCore" QT_LIBINFIX ".framework"))) { qtCoreBundle = bundle; break; }