125 Star 0 Fork 3

src-openEuler/automoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0018-Fix-framework-detection-on-Mac-where-Qt-is-installed.patch 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
ultra_planet 提交于 2020-03-12 10:05 . package init
From 6b9597ff35170fa14ae333f6b2de73749353d3bc Mon Sep 17 00:00:00 2001
From: Mike Arthur <[email protected]>
Date: Mon, 15 Mar 2010 22:07:33 +0000
Subject: [PATCH 18/33] Fix framework detection on Mac where Qt is installed
outside /Library/Frameworks.
svn path=/trunk/kdesupport/automoc/; revision=1103798
---
kde4automoc.cpp | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/kde4automoc.cpp b/kde4automoc.cpp
index e85ec62..314ab96 100644
--- a/kde4automoc.cpp
+++ b/kde4automoc.cpp
@@ -179,16 +179,22 @@ void AutoMoc::lazyInit()
dotFilesCheck(line == "MOC_INCLUDES:\n");
line = dotFiles.readLine().trimmed();
const QStringList &incPaths = QString::fromUtf8(line).split(';', QString::SkipEmptyParts);
+ QSet<QString> frameworkPaths;
foreach (const QString &path, incPaths) {
Q_ASSERT(!path.isEmpty());
mocIncludes << "-I" + path;
+ if (path.endsWith(".framework/Headers")) {
+ QDir framework(path);
+ // Go up twice to get to the framework root
+ framework.cdUp();
+ framework.cdUp();
+ frameworkPaths << framework.path();
+ }
}
- // on the Mac, add -F always, otherwise headers in the frameworks won't be found
- // is it necessary to do this only optionally ? Alex
-#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
- mocIncludes << "-F/Library/Frameworks";
-#endif
+ foreach (const QString &path, frameworkPaths) {
+ mocIncludes << "-F" << path;
+ }
line = dotFiles.readLine();
dotFilesCheck(line == "CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE:\n");
--
2.4.3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/automoc.git
[email protected]:src-openeuler/automoc.git
src-openeuler
automoc
automoc
master

搜索帮助