On the issue of detecting binary install vs manually compiled install
on OSX  - if this still has not been resolved:

I thought there were standard Qt detection routines for cmake that use
qmake to discover the layout of your Qt install. As long as qmake is
in a users path (or explicitly handed to cmake) this should provide a
single solution regardless of if a user installed binary release or a
manually compiled Qt. I am not on my mac at the moment, so I can't
verify but I believe the binary install places qmake in your path and
a manual (with default prefix) will place it at
/usr/local/Trolltech/Qt-4.5.version/bin/.

I usually use a manual build but I have used the binary install in the
past and I don't recall having to modify includes because of the
different layouts. Perhaps it may be a difference in the default qt
mkspec provided by qmake that is confusing cmake?

On a side note I am very happy to see that a patch to build on OSX
without pkg-config was made. (I am a little slow on catching up on the
mailing list!)

-Cyrus

On Tue, Sep 8, 2009 at 9:25 PM, Brendan Duncan <[email protected]> wrote:
> Quick update:
> Changing the headers worked and I was able to remove the QT_INCLUDE_DIR
> lines from the CMakeLists.txt files.
>
> In
> apiextractor/typesystem.cpp
> Change
> #include <Qt/QtXml>
> To
> #include <QtXml/QtXml>
>
> And in
> pyside/data/typesystem/typesystem_core.xml
> Change
> <include file-name="Qt/qtextdocument.h location="global">
> To
> <include file-name="QtGui/qtextdocument.h location="global">
>
>
> Now I just have the boost issue for the missing return_value_policy for
> void* in qthread_wrapper.cpp.  But it's getting close!
>
>
>
> On Tue, Sep 8, 2009 at 8:51 PM, Brendan Duncan <[email protected]>
> wrote:
>>
>> I did build Qt myself because I didn't know if Trolltech
>> (Nokia...whatever) included the x86_64 version of the libraries.
>>
>> When compiling it manually, it installs things in three places.  It
>> installs into all of the standard OSX Frameworks directories like you
>> mentioned; it makes the /usr/local/Qt4.5 directory, which just has some
>> configuration sorts of files; and it makes /usr/local/Trolltech/Qt-4.5.2,
>> which has the full includes/lib/bin/etc directories that would be available
>> on normal non-"I got to do things my own way" operating systems.
>>
>> You can use the Frameworks with Qt, or you can use the stuff in the
>> /usr/local/Trolltech directory.  A number of #include's in PySide use the
>> old-style Qt headers, like
>> #include <Qt/QtXml>
>> which can't be found in the Frameworks directories because there isn't a
>> framework for the generic <Qt/...> headers.
>>
>> I guess the correct solution would be to fix PySide.  PySide shouldn't be
>> using those headers, and should be using the actual Qt module directores,
>> #include <QtXml/QtXml>
>> in which case the headers would be found in the available Qt Frameworks.
>> CMake automatically adds the Qt libraries with the -framework linker
>> arguments, should everything should be good to go by getting rid of the
>> <Qt/...> includes.
>>
>> The one exception is that Trolltech doesn't include a Framework for
>> QtUiTools, which does get installed in the /usr/local/Trolltech directory
>> when building Qt manually.  In the pyside CMakeLists.txt, I had to add
>> set(QT_QTUITOOLS_INCLUDE_DIR
>> "/usr/local/Trolltech/Qt-4.5.2/include/QtUiTools")
>> in order for CMake to find those headers.  I'm not sure what you're
>> supposed to do if you just installed the binaries for Qt and Trolltech
>> doesn't provide a Framework for that.
>>
>>
>>
>>
>>
>> 2009/9/8 Mike Taylor <[email protected]>
>>>
>>> But there are still a couple of issues:
>>>
>>> * Qt headers still need to be found, which I fixed by adding
>>>
>>> set(QT_INCLUDE_DIR "/usr/local/Trolltech/Qt-4.5.2/include")
>>>
>>> to CMakeLists.txt.  I'm not sure what the best way of dealing with this
>>> is.
>>>
>>> FindQt4 defines QT_INCLUDE_DIR as far as I know.
>>> http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindQt4
>>>
>>> My knowledge about Mac OS is zero, but is /usr/local/Trolltech the
>>> default
>>> install dir? Any chance FindQt4 is looking in /usr/Trolltech?
>>>
>>> Actually Qt on the Mac is more complicated that. Brendan, did you build
>>> your own copy of Qt? I installed the binary package from the Qt web site and
>>> it has a /usr/local/Qt4.5 directory, but there's nothing of interest in
>>> there (i.e. no headers or libraries). There aren't any Trolltech directories
>>> anywhere that I can see.
>>> OS X has the concept of "Frameworks" and that is how Qt is packaged by
>>> default on the Mac. Frameworks are actually kind of nice. They are a
>>> packaging up of headers and libraries into a bundle. And, the bundles have
>>> versioning in them, so they can contain multiple versions.
>>> > ls -d /Library/Frameworks/Qt*
>>> /Library/Frameworks/Qt3Support.framework/
>>> /Library/Frameworks/QtOpenGL.framework/
>>> /Library/Frameworks/QtAssistant.framework/
>>> /Library/Frameworks/QtScript.framework/
>>> /Library/Frameworks/QtCore.framework/
>>> /Library/Frameworks/QtScriptTools.framework/
>>> /Library/Frameworks/QtDBus.framework/
>>> /Library/Frameworks/QtSql.framework/
>>> /Library/Frameworks/QtDesigner.framework/
>>> /Library/Frameworks/QtSvg.framework/
>>> /Library/Frameworks/QtDesignerComponents.framework/
>>> /Library/Frameworks/QtTest.framework/
>>> /Library/Frameworks/QtGui.framework/
>>> /Library/Frameworks/QtWebKit.framework/
>>> /Library/Frameworks/QtHelp.framework/
>>> /Library/Frameworks/QtXml.framework/
>>> /Library/Frameworks/QtNetwork.framework/
>>> /Library/Frameworks/QtXmlPatterns.framework/
>>> Those are the standard frameworks installed by Qt.
>>> You can use the includes from a framework or link to it by using the
>>> -framework flag on gcc (e.g. -framework QtCore). /Library/Framework is part
>>> of the standard framework path, so those frameworks will be found by the
>>> compiler.
>>> My quick glimpse of the CMake docs does indicate that it knows about OS X
>>> frameworks. But I'm not very familiar with the workings of CMake.
>>> I hope that helps. I hope I can scrape together some time to give
>>> building Pyslide a shot myself. I'm very excited about the project.
>>> /\/\ike
>
>
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.openbossa.org/listinfo/pyside
>
>
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to