[Interest] Handle files with the same name by automoc

Scott Aron Bloom scott.bloom at onshorecs.com
Mon May 5 16:13:57 CEST 2014

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...


-----Original Message-----
From: interest-bounces+scott.bloom=onshorecs.com at qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of CanisMajorWuff
Sent: Saturday, April 26, 2014 9:30 AM
To: interest at qt-project.org
Subject: [Interest] Handle files with the same name by automoc


There is the following source tree:


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

     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 at qt-project.org

More information about the Interest mailing list