[Interest] CMake AUTOMOC & Windows linking

Andy asmaloney at gmail.com
Fri May 15 20:07:56 CEST 2020


Thanks Thiago. I used the following to confirm that A's headers are not in
B's sources:

get_target_property( files ${plugin_target} SOURCES )
list( FILTER files INCLUDE REGEX ".*\.h" )
message( "Headers ${plugin_target}" )
foreach( filename ${files} )
   message( "  - ${filename}" )
endforeach()

This produces a list of B's headers - nothing related to A.

According to the AUTOMOC docs, that's what it should be using to moc,
correct?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Fri, May 15, 2020 at 1:24 PM Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On sexta-feira, 15 de maio de 2020 08:17:49 PDT Andy wrote:
> > 1) This setup was working before I added a class with Q_OBJECT & signals
> to
> > "A"
> > 2) It looks like I'm getting Foo's static meta object compiled into both
> > "A" and "B". Is this what should be happening?
> >
> > I feel like I'm missing something obvious...
>
> Make sure A's headers are not listed in B's header list.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel System Software Products
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200515/de2b2d15/attachment.html>


More information about the Interest mailing list