<div dir="ltr"><div><div><div>Hi Alan, <br><br></div>To get a better idea of the required change to support Qt5, you could look at what we did for VTK. See <a href="https://github.com/Kitware/VTK/commit/384636ec9f4">https://github.com/Kitware/VTK/commit/384636ec9f4</a><br>

<br></div>Hth<br></div>Jc<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 4:59 PM, Alan W. Irwin <span dir="ltr"><<a href="mailto:irwin@beluga.phys.uvic.ca" target="_blank">irwin@beluga.phys.uvic.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2014-01-26 17:36+0100 Stephen Kelly wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html" target="_blank">http://doc-snapshot.qt-<u></u>project.org/qt5-stable/cmake-<u></u>manual.html</a><br>
</blockquote>
<br>
To resurrect this slightly old thread, it has been years since I<br>
implemented the Qt4 parts of the PLplot build system, and I haven't<br>
looked much at the Qt components of our build system ever since.  So I<br>
am basically starting again from virtually no knowlege concerning<br>
CMake support for Qt to get the PLplot build system to find and use<br>
the Qt5 components that it needs.  I am frankly somewhat lost trying<br>
to use the above documentation which seems rather incomplete from my<br>
perspective.  Another complicating factor at the moment is I don't<br>
have access to Qt5 (running Debian stable) so, for now, I don't have a<br>
chance to try some experiments to work things out, and others (who<br>
have considerably less general knowledge than I do concerning the<br>
PLplot build system) will be trying out what is recommended here<br>
instead of me.<br>
<br>
So here are some specific questions related to PLplot's future Qt5 needs.<br>
<br>
(1) How should you replace<br>
<br>
find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)<br>
<br>
and<br>
<br>
qt4_wrap_cpp(<br>
  QT_MOC_OUTFILES<br>
  ${CMAKE_SOURCE_DIR}/include/<u></u>qt.h<br>
  OPTIONS ${MOC_OPTIONS}<br>
  )<br>
<br>
(the two key commands the PLplot build system currently uses for Qt4)<br>
with the new cmake finding infrastructure documented above?<br>
(MOC_OPTIONS are some macros we set to control including or dropping<br>
various parts of the PLplot qt.h header file.)<br>
<br>
(2) PLplot currently does not use include(${QT_USE_FILE}) since in my<br>
view that directory property approach is too blunt an instrument that<br>
tends to contaminate the large parts of the PLplot build that have<br>
nothing to do with Qt with all the Qt-related compiler flags. Instead,<br>
we use the alternative approach of simply setting the appropriate Qt<br>
compile flags for our specific Qt-related source files.  Does Qt5<br>
still use that directory property apprach for setting compile flags<br>
or is this no longer an issue?<br>
<br>
(3) Our current alternative to include(${QT_USE_FILE}) still sets<br>
QT_LIBRARIES.  That allows us to link one of the key PLplot Qt-related libraries<br>
as follows:<br>
<br>
target_link_libraries(<br>
  plplotqt${LIB_TAG}<br>
  plplot${LIB_TAG}<br>
  ${MATH_LIB}<br>
  ${QT_LIBRARIES}<br>
  )<br>
<br>
How should that command be replaced for the new Qt5 way of doing<br>
things?<br>
<br>
It appears from the above documentation that the new Qt5 find and use<br>
methods are quite dependent on CMake version so assume for the<br>
purposes of this question that our build system will force the PLplot<br>
user to use CMake version 2.8.11 or higher by the time we have this<br>
all debugged.<br>
<br>
Thanks in advance for any help you can give with the specific<br>
questions above for converting a project such as PLplot that currently<br>
uses Qt4 to one that uses Qt5.<br>
<br>
Alan<br>
__________________________<br>
Alan W. Irwin<br>
<br>
Astronomical research affiliation with Department of Physics and Astronomy,<br>
University of Victoria (<a href="http://astrowww.phys.uvic.ca" target="_blank">astrowww.phys.uvic.ca</a>).<br>
<br>
Programming affiliations with the FreeEOS equation-of-state<br>
implementation for stellar interiors (<a href="http://freeeos.sf.net" target="_blank">freeeos.sf.net</a>); the Time<br>
Ephemerides project (<a href="http://timeephem.sf.net" target="_blank">timeephem.sf.net</a>); PLplot scientific plotting<br>
software package (<a href="http://plplot.sf.net" target="_blank">plplot.sf.net</a>); the libLASi project<br>
(<a href="http://unifont.org/lasi" target="_blank">unifont.org/lasi</a>); the Loads of Linux Links project (<a href="http://loll.sf.net" target="_blank">loll.sf.net</a>);<br>
and the Linux Brochure Project (<a href="http://lbproject.sf.net" target="_blank">lbproject.sf.net</a>).<br>
__________________________<br>
<br>
Linux-powered Science<br>
__________________________<div class="HOEnZb"><div class="h5"><br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br>
</div>