[Interest] Shadow build / Xcode project

Reinhardt Behm rbehm at hushmail.com
Sun Jan 4 14:36:45 CET 2015

On 04.01.2015 20:24, Nuno Santos wrote:
> Hi,
> I have performed on the command line “qmake myproject.pro” to generate 
> the Xcode project file.
> It happens that all the files generated on this process as well as the 
> moc_* generated files polute my source directory.
> To avoid this I have tried to create a xcode dir and ran “qmake 
> ../myproject.pro”, however, this way, the project doesn’t compile on 
> xcode, complaining about
> clang: error: no such file or directory: 
> '/Users/nsantos/workspace/myproject/myproject_qml_plugin_import.cpp'
> clang: error: no input files
> It seems it is not ready for this dir architecture.
> Is there any ways of making a cleaner source directory without making 
> the xcode project polluting it with Makefiles and moc_* files, etc?
> Thanks in advance,
> Regards,
> Nuno Santos
I use mostly Linux and not Xcode but I assume the qmake vars 
OBJECTS_DIR, UI_DIR, MOC_DIR and DESTDIR also work there.
Using them you can control where all the files will be placed and avoid 
polluting yout source directory.

I am using

MOC_DIR = .build/moc
UI_DIR = .build/ui
OBJECTS_DIR = .build/obj
DESTDIR = ./bin

  in nearly every .pro file. This keeps my source directory clean. qmake 
will even create those dirs automatically.
By using ".build/" this directory is created inside the source dir but 
hidden in Linux.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150104/ef2359c0/attachment.html>

More information about the Interest mailing list