All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

VWR-24252: Find Qt4 with find_package on STANDALONE.

Review Request #46 - Created Dec. 19, 2010 and submitted

Aleric Inglewood Reviewers
viewer
VWR-24252
None viewer-development
This patch has only effect on standalone.
It searches for the Qt libs using the cmake provided FindQt4.cmake
and search for llqtwekbit using the new FindLLQtWebkit.cmake
and then uses the resulting LLQTWEBKIT_LIBRARY
and LLQTWEBKIT_INCLUDE_DIR in the right places.

I added an explicit test to check if QTDIR is set, it is set to
the correct value (even LL got this wrong on their wiki, so it's
apparently not obvious): As of Qt 4, Qt is found by calling qmake,
NOT by looking at QTDIR. So, if you set QTDIR then it better be
set to whatever qmake was "found" (using PATH as usual).

Finally, we also need to explicitly pass the Qt plugin libraries
in order to link with them, so part of this patch adds the rules
to do that (the foreach).

Note that if you installed your libs in a non-standard place, then
of course you still have to set LD_LIBRARY_PATH yourself before
running the viewer ;)
I used this while working on adding plugin support to Imprudence, needing to debug into the Qt libs and llqtwebkit. I added support for multiple versions of llqtwebkit to imprudence (not just the one needed, but also newer versions of llqtwebkit). Needless to say that I needed this patch to work to find my (several) installations of Qt and llqtwebkit.
Review request changed
Updated (Dec. 20, 2010, 6:19 a.m.)
  • This patch has only effect on standalone.
    It searches for the Qt libs using the cmake provided FindQt4.cmake.
    
    I added an explicit test to check if QTDIR is set, it is set to
    the correct value (even LL got this wrong on their wiki, so it's
    apparently not obvious): As of Qt 4, Qt is found by calling qmake,
    NOT by looking at QTDIR. So, if you set QTDIR then it better be
    set to whatever qmake was "found" (using PATH as usual).
    
    While FindLLQtWebkit.cmake was added to the repository, it wasn't
    used for some reason... but it works perfectly. This patch uses it
    to find LLQtWebkit and then uses the resulting LLQTWEBKIT_LIBRARY
    and LLQTWEBKIT_INCLUDE_DIR in the right places.
    
    Finally, we also need to explicitly pass the Qt plugin libraries
    in order to link with them, so part of this patch adds the rules
    to do that (the foreach).
    

    This patch has only effect on standalone.
    It searches for the Qt libs using the cmake provided FindQt4.cmake
    and search for llqtwekbit using the new FindLLQtWebkit.cmake
    and then uses the resulting LLQTWEBKIT_LIBRARY
    and LLQTWEBKIT_INCLUDE_DIR in the right places.
    
    I added an explicit test to check if QTDIR is set, it is set to
    the correct value (even LL got this wrong on their wiki, so it's
    apparently not obvious): As of Qt 4, Qt is found by calling qmake,
    NOT by looking at QTDIR. So, if you set QTDIR then it better be
    set to whatever qmake was "found" (using PATH as usual).
    
    Finally, we also need to explicitly pass the Qt plugin libraries
    in order to link with them, so part of this patch adds the rules
    to do that (the foreach).
    
    Note that if you installed your libs in a non-standard place, then
    of course you still have to set LD_LIBRARY_PATH yourself before
    running the viewer ;)
The new version is the same as the previous one, but it adds indra/cmake/FindLLQtWebkit.cmake that was erroneously missing in the previous patch.