[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-buildsystem
Subject: Re: Automoc4 problems on OSX
From: Mike Arthur <mike () mikearthur ! co ! uk>
Date: 2010-03-15 19:47:52
Message-ID: 9C590BA6-23A9-4DD3-8091-E33494F31553 () mikearthur ! co ! uk
[Download RAW message or body]
On 1 Mar 2010, at 22:03, Alexander Neundorf wrote:
> is -F included in INCLUDE_DIRECTORIES ?
Nope but you can work it out from MOC_DIRECTORIES.
> If not, if on Mac, we need to check whether -F is in the link libraries. Hmm,
> but the target does not yet exist at this point. Hmm. Maybe automoc4 could
> check the location of the QtCore library and use this to determine whether
> and where Qt is installed as frameworks ?
I've attached a patch for this. It should add all the needed frameworks. Seems to \
work for me. Can you review it and if it's OK I'll commit it.
> Where ?
> Do you mean in trunk or in a branch or in git ?
> Whereever you prefer :-)
> CMake just switched to git.
Cool, I'll get started on this at some point. I'll probably start doing it in trunk, \
as long as I don't remove any functionality that should be fine, right?
["automoc4-frameworks.patch" (automoc4-frameworks.patch)]
Index: kde4automoc.cpp
===================================================================
--- kde4automoc.cpp (revision 1095729)
+++ kde4automoc.cpp (working copy)
@@ -179,16 +179,22 @@
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");
--
Cheers,
Mike Arthur
http://mikearthur.co.uk
_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic