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

Scott

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

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 at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list