Use separate libraries for each directory This isn't an automoc issue, it's a "multiple files with the same name in the same library issue"
If they weren't header files, but rather straight c++ files, you wouldn't be asking this... Scott -----Original Message----- From: interest-bounces+scott.bloom=onshorecs....@qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs....@qt-project.org] On Behalf Of CanisMajorWuff Sent: Saturday, April 26, 2014 9:30 AM To: interest@qt-project.org Subject: [Interest] Handle files with the same name by automoc Hi, There is the following source tree: *-source *----subsource *--------Source1.hpp *----Source1.hpp Both files, ./Source1.hpp and ./subsource/Source1.hpp, must be handled by moc. When using automoc it puts output moc files to the same directory with the same name, since it is impossible it overwrites the file. Qt - 5.2 CMake - 2.8.12 CMake files are rather big, but here is a brief example: # Main CMakeLists.txt set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) add_subdirectory("${CMAKE_SOURCE_DIR}/components/Com1" ./Com1) # Com1 CMakeLists.txt in components/Com1 file(GLOB_RECURSE CPP_FILES source/*.cpp) add_library(Com1 SHARED ${CPP_FILES}) Any solutions? _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest