OK. I don't know why my cmake code to show the SOURCES wasn't showing them, but when I looked in the ninja json files, A's headers were in the "sources" section.
The problem turned out to be this: target_sources( libA PUBLIC ... It needs to be: target_sources( libA PRIVATE ... The PRIVATE vs. PUBLIC on target_sources() didn't make sense to me before, but with this concrete example I think I understand it better. :-) Thanks for pointing me in the right direction Thiago! --- Andy Maloney // https://asmaloney.com twitter ~ @asmaloney <https://twitter.com/asmaloney> On Fri, May 15, 2020 at 2:15 PM Matthew Woehlke <mwoehlke.fl...@gmail.com> wrote: > On 15/05/2020 11.17, Andy wrote: > > I'm running into a link problem on Windows. I only have Windows on CI, so > > debugging this is... challenging. > > > > - cmake 3.10+ > > > > - AUTOMOC is ON for the project in the top level cmake file > > > > - Dynamic Library "A": > > class LIB_IMPORT_EXPORT Foo > > { > > Q_OBJECT > > ... > > > > where LIB_IMPORT_EXPORT uses Q_DECL_EXPORT/Q_DECL_IMPORT properly > > depending on who's building. > > This isn't necessarily your problem, but if you're using CMake, I would > recommend using generate_export_header to define your ABI decoration > symbols rather than rolling your own using Q_DECL_EXPORT/Q_DECL_IMPORT. > > -- > Matthew >
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest