[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] smoke qt empty builds on macosx
From:       Michael Lawrence <lawrence.michael () gene ! com>
Date:       2010-05-03 12:53:31
Message-ID: t2uacbd1aed1005030553o40036d19if063be05e51cb1c3 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

Thanks for passing along this interesting fix. I've also encountered issues
with the Mac, in particular the framework build. I think the ideal solution
would be to make the generator framework-aware, i.e., it should support a -F
command-line option. I've modified my copy of the generator to correctly
search the default framework directory (I think it's /System/Frameworks) for
the Qt header files, following the same logic as Apple's gcc. If this is of
interest to the smoke project, I could enhance this to allow arbitrary
framework directories, such as the one provided by cmake in the
QT_LIBRARY_DIR variable, and provide the patch.

Michael

On Fri, Apr 30, 2010 at 10:14 PM, Petr Vanek <petr@scribus.info> wrote:

> hi all,
>
> I'm facing a bug with empty generated smokeqt libs. It was due
> unexpectable setting of QT_INCLUDE_DIR in the case I use Qt4 with
> mac's frameworks. See cmake issue:
>
> http://public.kitware.com/Bug/view.php?id=10632
>
> after then I created following patch for our internal copy of smoke
> (unsplitted to modules still). Maybe you will be interested.
>
> cheers,
> Petr
>
> Index: config.xml.cmake
> ===================================================================
> --- config.xml.cmake    (revision 3428)
> +++ config.xml.cmake    (working copy)
> @@ -4,7 +4,7 @@
>      <generator>smoke</generator>
>      <definesList>@CMAKE_BINARY_DIR@/smoke/qtdefines</definesList>
>      <includeDirs>
> -        <dir>@QT_INCLUDE_DIR@</dir>
> +        <dir>@CONFIGXML_INCLUDE_DIR@</dir>
>          <dir>@QT_QTCORE_INCLUDE_DIR@</dir>
>          <dir>@QT_QTGUI_INCLUDE_DIR@</dir>
>          <dir>@QT_QTNETWORK_INCLUDE_DIR@</dir>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt      (revision 3428)
> +++ CMakeLists.txt      (working copy)
> @@ -1,6 +1,16 @@
>
>  include_directories( ${QT_INCLUDES} ${CMAKE_SOURCE_DIR}/smoke )
>
> +# HACK to fixup macosx issue with QT_INCLUDE_DIR:
> +# QT_INCLUDE_DIR /opt/local/libexec/qt4-mac/include;/opt/local/
> libexec/qt4-mac/lib/QtCore.framework
> +# it should be only:
> +# QT_INCLUDE_DIR /opt/local/libexec/qt4-mac/include
> +if (QT_USE_FRAMEWORKS)
> +    set(CONFIGXML_INCLUDE_DIR ${QT_HEADERS_DIR})
> +else(QT_USE_FRAMEWORKS)
> +    set(CONFIGXML_INCLUDE_DIR ${QT_INCLUDE_DIR})
> +endif(QT_USE_FRAMEWORKS)
> +
>  configure_file(config.xml.cmake ${CMAKE_CURRENT_BINARY_DIR}/
> config.xml @ONLY)
>
>  # for QtGuess.txt
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings@kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>

[Attachment #5 (text/html)]

Hi, <br><br>Thanks for passing along this interesting fix. I&#39;ve also encountered \
issues with the Mac, in particular the framework build. I think the ideal solution \
would be to make the generator framework-aware, i.e., it should support a -F \
command-line option. I&#39;ve modified my copy of the generator to correctly search \
the default framework directory (I think it&#39;s /System/Frameworks) for the Qt \
header files, following the same logic as Apple&#39;s gcc. If this is of interest to \
the smoke project, I could enhance this to allow arbitrary framework directories, \
such as the one provided by cmake in the QT_LIBRARY_DIR variable, and provide the \
patch.<br> <br>Michael<br><br><div class="gmail_quote">On Fri, Apr 30, 2010 at 10:14 \
PM, Petr Vanek <span dir="ltr">&lt;<a \
href="mailto:petr@scribus.info">petr@scribus.info</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> hi all,<br>
<br>
I&#39;m facing a bug with empty generated smokeqt libs. It was due<br>
unexpectable setting of QT_INCLUDE_DIR in the case I use Qt4 with<br>
mac&#39;s frameworks. See cmake issue:<br>
<br>
<a href="http://public.kitware.com/Bug/view.php?id=10632" \
target="_blank">http://public.kitware.com/Bug/view.php?id=10632</a><br> <br>
after then I created following patch for our internal copy of smoke<br>
(unsplitted to modules still). Maybe you will be interested.<br>
<br>
cheers,<br>
Petr<br>
<br>
Index: config.xml.cmake<br>
===================================================================<br>
--- config.xml.cmake    (revision 3428)<br>
+++ config.xml.cmake    (working copy)<br>
@@ -4,7 +4,7 @@<br>
      &lt;generator&gt;smoke&lt;/generator&gt;<br>
      &lt;definesList&gt;@CMAKE_BINARY_DIR@/smoke/qtdefines&lt;/definesList&gt;<br>
      &lt;includeDirs&gt;<br>
-        &lt;dir&gt;@QT_INCLUDE_DIR@&lt;/dir&gt;<br>
+        &lt;dir&gt;@CONFIGXML_INCLUDE_DIR@&lt;/dir&gt;<br>
          &lt;dir&gt;@QT_QTCORE_INCLUDE_DIR@&lt;/dir&gt;<br>
          &lt;dir&gt;@QT_QTGUI_INCLUDE_DIR@&lt;/dir&gt;<br>
          &lt;dir&gt;@QT_QTNETWORK_INCLUDE_DIR@&lt;/dir&gt;<br>
Index: CMakeLists.txt<br>
===================================================================<br>
--- CMakeLists.txt      (revision 3428)<br>
+++ CMakeLists.txt      (working copy)<br>
@@ -1,6 +1,16 @@<br>
<br>
  include_directories( ${QT_INCLUDES} ${CMAKE_SOURCE_DIR}/smoke )<br>
<br>
+# HACK to fixup macosx issue with QT_INCLUDE_DIR:<br>
+# QT_INCLUDE_DIR /opt/local/libexec/qt4-mac/include;/opt/local/<br>
libexec/qt4-mac/lib/QtCore.framework<br>
+# it should be only:<br>
+# QT_INCLUDE_DIR /opt/local/libexec/qt4-mac/include<br>
+if (QT_USE_FRAMEWORKS)<br>
+    set(CONFIGXML_INCLUDE_DIR ${QT_HEADERS_DIR})<br>
+else(QT_USE_FRAMEWORKS)<br>
+    set(CONFIGXML_INCLUDE_DIR ${QT_INCLUDE_DIR})<br>
+endif(QT_USE_FRAMEWORKS)<br>
+<br>
  configure_file(config.xml.cmake ${CMAKE_CURRENT_BINARY_DIR}/<br>
config.xml @ONLY)<br>
<br>
  # for QtGuess.txt<br>
_______________________________________________<br>
Kde-bindings mailing list<br>
<a href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-bindings" \
target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br> \
</blockquote></div><br>



_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic