|
|||||||
| Qt Programming General Qt programming issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I came across a problem with qmake and Makefile. I have this kind of directory structure : Qt Code:
As you can see in the sample, some name collisions will happen. There is no problem at the C++ level, but during the compilation stage some targets will have the same name. For instance: Qt Code:
Is there any easy solution to create the same directory structure for object files as the source files ? It should be something like that: Qt Code:
|
|
#2
|
|||
|
|||
|
you can use the OBJECTS_DIR and MOC_DIR tags in the pro file of each subproject (we are talking about sub projects here right?)
__________________
Archimedes |
|
#3
|
|||
|
|||
|
Unfotunately we're not talking about subprojects. We have a single .pro files as we build a single programm (no DLL).
OBJECTS_DIR seems to be working only if we had a .pro file per namespace. Is it somehow possible ? Having many .pro files sounds a bit ackward in this case, doesn't it ? What I'm looking for basically is a way to tell what object file path I want for every single src file. |
|
#4
|
|||
|
|||
|
Quote:
If you are not willing or can't use a diferent project structre, then you will have to give up on atuomation, and use a custom hand made makefile. There you can define each o file. But to me, your project structure makes little sense. Either use deferent development branches to the same project, or/and use sub projects - that would be my advice..
__________________
Archimedes |
|
#5
|
|||
|
|||
|
The problem is not with qmake but with make. I suggest you either rename one of the files or separate your build into subprojects consisting of static libraries which you can then link together to form the final binary code.
|
| The following user says thank you to wysota for this useful post: | ||
PowerKiKi (30th October 2007) | ||
|
#6
|
|||
|
|||
|
I guess I'll go for static library option. Thank you for that suggestion.
But still I don't get why my approach isn't supported. I'd say it's rather an easy obvious way to separate developpers' code without the need of "complicated" library linking. |
|
#7
|
|||
|
|||
|
To any of the CMake gurus:
Is this possible under CMake? I will give it a try tomorrow. |
|
#8
|
|||
|
|||
|
I'd say an obvious way is to use branches in your code repository.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|