<div dir="ltr">Sounds like you have ended up at the same solution I did. I had trouble getting the automated qt generation working, and in the end I made it explicit<div><br></div><div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>if(ARG_MOC)</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>qt5_wrap_cpp(MOC_OUT ${ARG_MOC})</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>endif()</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>if(ARG_RES)<br></font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>qt5_add_resources(RES_OUT ${ARG_RES})</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>endif()</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>if(ARG_UI)<br></font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>qt5_wrap_ui(UI_OUT ${ARG_UI})</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>endif()</font></div></div><div><font face="monospace, monospace"><br></font></div><div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>add_library(</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>${ARG_NAME}</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>${LINK} </font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>${ARG_SRCS} ${MOC_OUT} ${RES_OUT} ${UI_OUT}</font></div><div><font face="monospace, monospace"><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>)</font></div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 October 2016 at 12:40, 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">Since I have gotten no response to my posts with this subject line, I<br>
assume automoc really is currently unsuitable for the case where the<br>
header that should be processed by moc is located in a different<br>
source-tree directory than the source file that includes that header.<br>
I temporarily worked around that issue with symlinks, but I then<br>
discovered that qt5_wrap_cpp produces exactly the same results as<br>
automoc (except for the identification of the header in its actual<br>
location as opposed to the symlink) and with no need for symlinks.  So<br>
I have abandoned automoc and used a custom target that invokes<br>
qt5_wrap_cpp instead, and that has allowed me to complete my update to<br>
the PLplot build system so that it replaces qt5_use_modules calls with<br>
the modern recommended target_link_libraries method of setting up use<br>
of Qt5.  And this change has also solved the issue of conflicts<br>
between plain and keyworded target_link_libraries calls that occurred<br>
with the qt5_use_modules based method.  So I am now satisfied with the<br>
PLplot build-system update, but I think automoc would be preferable to<br>
custom targets involving qt5_wrap_cpp if the above deficiency with<br>
automoc could be solved, so I will be pursuing that question further<br>
on the cmake-devel list.<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" rel="noreferrer" 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" rel="noreferrer" target="_blank">freeeos.sf.net</a>); the Time<br>
Ephemerides project (<a href="http://timeephem.sf.net" rel="noreferrer" target="_blank">timeephem.sf.net</a>); PLplot scientific plotting<br>
software package (<a href="http://plplot.sf.net" rel="noreferrer" target="_blank">plplot.sf.net</a>); the libLASi project<br>
(<a href="http://unifont.org/lasi" rel="noreferrer" target="_blank">unifont.org/lasi</a>); the Loads of Linux Links project (<a href="http://loll.sf.net" rel="noreferrer" target="_blank">loll.sf.net</a>);<br>
and the Linux Brochure Project (<a href="http://lbproject.sf.net" rel="noreferrer" target="_blank">lbproject.sf.net</a>).<br>
__________________________<br>
<br>
Linux-powered Science<br>
__________________________<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_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" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><br>
</blockquote></div><br></div>