[CMake] AUTOMOC does not process headers in subdirectory of include/
Mario Emmenlauer
mario at emmenlauer.de
Fri Apr 12 03:29:47 EDT 2019
Anyone?
On 10.04.19 14:48, Mario Emmenlauer wrote:
>
> Dear all,
>
> we have a problem that Qt moc is only called for headers in the
> include directory of the project, not for subdirectories. Attached
> is a minimal example. cmake should call moc to generate the moc-
> sources in MyQtWidgets_autogen/include/bda/ folder. However the
> sources are not generated. When I move the header out of the
> subdirectory (from include/bda/CollapsibleDockWidget.hh to
> include/CollapsibleDockWidget.hh) and fix the include path in the
> source files, then moc works correctly.
>
> I think this is wrong, but I could not find explicit documentation
> about how the headers and sources are set for moc (see [1]).
>
> Does cmake not respect the headers listed with add_library()?
> Or is there something else I'm doing wrong?
>
> All the best,
>
> Mario Emmenlauer
>
> [1] https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC.html
>
>
--
BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
Balanstr. 43 mailto: memmenlauer * biodataanalysis.de
D-81669 München http://www.biodataanalysis.de/
More information about the CMake
mailing list