[CMake] CMake, Qt4, Ubuntu and Phonon

Félix C. Morency felix.morency at gmail.com
Wed Nov 23 10:18:27 EST 2011


Clinton,

I did a small test and it works with qmake because phonon is the
standard search paths. It justs add -lphonon to the compiler command
line.

If not patched, there should be a note in the CMake FindQt4
documentation about the fact that it doesn't support finding phonon as
a 3rd party module (as opposed to a standard Qt4 module).

I agree with your concern about different Qt version and Phonon. On
Ubuntu, it seems ok to do so because they control the package
released, but the behavior might become undefined if someone decides
to build their own version using incompatible Qt/Phonon combination.
That could also be mentioned in the module documentation, if patched.
It would also be possible to detect if the phonon found by the CMake
module is part of the Qt4 release by comparing its location with the
library path returned by qmake? Do you see any potential issue with
that approach?

Regards,
-- 
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634

On Tue, Nov 22, 2011 at 5:11 PM, Clinton Stimpson <clinton at elemtech.com> wrote:
> On Tuesday, November 22, 2011 02:34:55 pm Félix C. Morency wrote:
>> As we pointed out in the bug thread located at
>>
>> https://bugs.launchpad.net/ubuntu/+source/phonon/+bug/893170
>>
>> the FindPhonon script is not portable to Windows. I agree with André's
>> comment: the source of the problem is the Ubuntu way of distributing
>> Qt4 and Phonon.
>>
>> We also have to keep in mind that the official CMake module FindQt4
>> doesn't actually find Qt4 correctly on Ubuntu. I think this is a
>> problem for both Ubuntu and CMake. The two solutions to this problem I
>> can think of are 1) Patch the FindQt4 script so it can find Phonon
>> correctly when not distributed with Qt4 and 2) Make pressure on the
>> Ubuntu community so it distribute Phonon as a Qt4 (optional) package
>> (like Debian does).
>>
>> I would like to have your feedback on this issue so we can discuss
>> alternative solutions. Feel free to comment on the bug report to make
>> pressure on the Ubuntu community.
>>
>> I would be happy to patch the FindQt4 module if the community agrees
>> on this solution.
>
> Does it work if one is using qmake simply because phonon is in the linker's
> standard search paths?
> Or does qmake on Ubuntu know how to find phonon?
>
> phonon is treated as a Qt module as far as qmake and FindQt4.cmake are
> concerned, and not as a 3rd party library, like zlib and others.
>
> But, I'm not opposed to modifying FindQt4.cmake, but I have a concern if one
> builds their own Qt (different version) without phonon, is it OK to find
> /usr/lib/libphonon.so?
>
> --
> Clinton Stimpson
> Elemental Technologies, Inc
> Computational Simulation Software, LLC
> www.csimsoft.com
>


More information about the CMake mailing list