[CMake] CMAKE_INCLUDE_CURRENT_DIR on a function

Tiago Macarios tiagomacarios at gmail.com
Mon Oct 24 18:42:19 EDT 2016


Hi,

Does CMAKE_INCLUDE_CURRENT_DIR need to be set outside of a function?

I have a function where I define an executable "add_executable". This
executable uses moc'ed Qt clasees, so I need to set
CMAKE_INCLUDE_CURRENT_DIR. It seems like I have to set it from the top
level script calling the function. If I set it inside the function the
compilation fails with a missing moc file.

Any ideas?

Tiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161024/260be9e9/attachment.html>


More information about the CMake mailing list