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

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Oct 20 13:40:11 EDT 2016


Since I have gotten no response to my posts with this subject line, I
assume automoc really is currently unsuitable for the case where the
header that should be processed by moc is located in a different
source-tree directory than the source file that includes that header.
I temporarily worked around that issue with symlinks, but I then
discovered that qt5_wrap_cpp produces exactly the same results as
automoc (except for the identification of the header in its actual
location as opposed to the symlink) and with no need for symlinks.  So
I have abandoned automoc and used a custom target that invokes
qt5_wrap_cpp instead, and that has allowed me to complete my update to
the PLplot build system so that it replaces qt5_use_modules calls with
the modern recommended target_link_libraries method of setting up use
of Qt5.  And this change has also solved the issue of conflicts
between plain and keyworded target_link_libraries calls that occurred
with the qt5_use_modules based method.  So I am now satisfied with the
PLplot build-system update, but I think automoc would be preferable to
custom targets involving qt5_wrap_cpp if the above deficiency with
automoc could be solved, so I will be pursuing that question further
on the cmake-devel list.

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