I have a project with some folders that contain source files with the same names.
My source tree looks like this:
project.pro foo/ conflict.h conflict.cpp bar/ conflict.h conflict.cpp some.h other.h files.h main.cpp
By default, qmake creates a Makefile that will generate an assembly tree as follows:
conflict.o main.o target
Where conflict.o is the object file obtained for both foo/conflict.cpp and foo/conflict.h .
I canβt change my names because they are generated using an external tool and forcing different file names will mean changing their contents, therefore this is not an option.
I also do not want to use the qmake SUBDIRS template, since this will mean that (1) each subdirectory is created separately as a library and, thus, greatly complicates the general assembly process (at least in my eyes) and (2) in the top-level directory of I cannot have any source files. Or am I wrong?
Can't I just tell qmake to write object files to separate directories in the assembly directory? So my build tree will look like this:
foo/ conflict.o bar/ conflict.o main.o target
Or are there any other solutions that do not require renaming the source files or introducing something as complex as static libraries? I just can't believe that Qt has not solved this problem (in my eyes simple) for many years. (I already had this problem 4 years ago, but I can rename the files in this project, but here I cannot.)
If this is important: I am using Qt 4.8 for both Ubuntu with g ++ and Windows using mingw32.
leemes
source share