[CMake] Cannot get automoc to work properly with recommended Qt5 support method

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sun Oct 16 17:22:58 EDT 2016


On 2016-10-16 13:43-0700 Alan W. Irwin wrote:

> To move to a related topic, the above URL has a tutorial example for
> the recommended support method which builds the helloworld target from
> main.cpp.  It would be nice for Qt5 users to learn from that tutorial
> example by building it themselves, but that example is incomplete
> since no main.cpp (presumably Qt5-related) is provided (as far as I
> can discover).  Any chance you could provide that simple example for
> developers like me who don't have a lot of Qt5 or C++ expertise but
> who just want to build other's Qt5-related work using the best
> CMake-related methods?

Hi Stephen:

Further to this particular subtopic, a google search found me several
qt hello world examples.  The most prominent one does not work (it
uses an ancient method which is no longer supported by Qt!), but
I found that the one in <https://wiki.qt.io/Qt_for_Beginners> does work
perfectly with the tutorial Qt5 cmake example.  So I request you
make that hello world routine (or something closely related) available
at <http://doc.qt.io/qt-5/cmake-manual.html> to make that tutorial
more self-contained.

That said, there are no issues with setting macros in this simple
hello world case so it doesn't help with the principal issue covered
in my e-mail where I cannot seem to set the macros needed for automoc
to work properly.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list