[CMake] Custom directories for QT4

Andreas Pakulat apaku at gmx.de
Mon Oct 29 12:47:07 EDT 2007


On Montag, 29. Oktober 2007, Marcin Gil wrote:
> Hi!
>
> Using qmake and it's project files one can define locations eg for
> moc/ui parsed files.
> The variables are UI_DIR for UI generated headers location and
> MOC_DIR for moc generated files.
>
> Simply setting set (UI_DIR ui) doesn't work.
>
> Is there a way to force generation of those files to directories I
> want? So that after:
>
> set (xx_UIS xx.ui)
> qt4_wrap_ui(xx_UIS_H ${xx.UIS})
>
> those would land in "ui" subdirectory?

I may be overlooking something, but the usual use-case for this with 
QMake is to either not clutter the source tree with buildfiles or to 
have different output directories for different build-configurations.

Neither of the two applies to CMake, it encourages to use out-of-source 
builds which means you don't get crap into your source tree. And also 
with CMake you can't have a builddir containing multiple output files 
frmo different configuration. As soon as you switch from release to 
debug build everything gets rebuild anyway.

So, I think the answer to your question is: no thats not possible with 
CMake, but its also not needed.

Andreas

-- 
Advancement in position.


More information about the CMake mailing list