[CMake] AUTOMOC with files on different folders

Attila Krasznahorkay attila.krasznahorkay at gmail.com
Wed May 11 03:48:41 EDT 2016


Hi Tiago,

This is one of those cases when you have to declare the header files to add_library(...) as well. In that case AUTOMOC should work fine. At least it does for us, in a very similar setup.

http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/graphics/VP1/VP1Gui/CMakeLists.txt

Cheers,
            Attila

> On 11 May 2016, at 07:14, Tiago Macarios <tiagomacarios at gmail.com> wrote:
> 
> Hi,
> 
> I am having trouble using AUTOMOC with a project where header files and source files are in different sub-directories. I wrote a detailed stack overflow question here:
> http://stackoverflow.com/questions/37151163/cmake-automoc-with-files-on-different-folders
> and would really appreciate if someone could give me a couple of ideas to try out.
> 
> Thanks,
> Tiago
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake



More information about the CMake mailing list