I have a source directory layout like this: ├── gl │ ├── Axis2D.h │ ├── Grid2D.h │ ├── Image2D.h │ └── v20 │ ├── Axis2D.h │ ├── Grid2D.h │ └── Image2D.h ├── GLContainer.h ├── glsl │ └── v110 │ ├── GLFlatShader2D.h │ ├── GLImageShader2D.h │ └── GLLineShader2D.h ├── GLUtil.h ├── GLView2D.h ├── GLWindow.h └── TexelProperties.h
And use this cmake configuration: set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(QTWIDGETS_GL_HEADERS gl/Axis2D.h gl/Grid2D.h gl/Image2D.h) set(QTWIDGETS_GL_V20_HEADERS gl/v20/Axis2D.h gl/v20/Grid2D.h gl/v20/Image2D.h) As you can see, the names are duplicated in the two subdirectories. Unfortunately, automoc generates this: /* This file is autogenerated, do not edit*/ #include "moc_GLContainer.cpp" #include "moc_GLView2D.cpp" #include "moc_GLWindow.cpp" #include "moc_Axis2D.cpp" #include "moc_Grid2D.cpp" #include "moc_Image2D.cpp" #include "moc_Axis2D.cpp" #include "moc_Grid2D.cpp" #include "moc_Image2D.cpp" #include "moc_GLFlatShader2D.cpp" #include "moc_GLImageShader2D.cpp" #include "moc_GLLineShader2D.cpp" Compilation inevitably fails due to it including the generated source files twice. It's discarded the path information. - is this a known issue? - is there any way to get automoc support to add the full pathname to the generated sources e.g. moc_gl_Axis2D.cpp and moc_gl_v20_Axis2D.cpp. - any workarounds known for this issue? Many thanks, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools `- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800 -- 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