[CMake] AUTOMOC with files on different folders

Hendrik Sattler post at hendrik-sattler.de
Wed May 11 23:20:58 EDT 2016



Am 12. Mai 2016 00:00:12 MESZ, schrieb Tiago Macarios <tiagomacarios at gmail.com>:
>Hi Attila,
>
>Thank you for your help. You are right, if I apply the following
>modifications it works indeed:
>
>set( proj_HEADER
>    include/a.h
>)
>
>add_library(proj SHARED ${proj_SOURCE} ${proj_HEADER})
>
>But now I got a second question. Why is adding the header files
>necessary?
>(Sorry the possibly naive question)
>
>I thought that adding the header files to the target was an
>anti-pattern (
>http://voices.canonical.com/jussi.pakkanen/2013/03/26/a-list-of-common-cmake-antipatterns/
>). Is it related to moc generating header files during the build? If so
>why
>is it not a problem when everything is on the same folder?

That same page has a Errata section at the end. 

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.


More information about the CMake mailing list