[CMake] Changing CMake default directories.

Hendrik Sattler post at hendrik-sattler.de
Wed Oct 22 08:09:36 EDT 2008


Paweł Żak schrieb:
> Hi,
> 
> I have a problem with changing CMake default directories and I need your
> help.
> 
> The usual layout of projects we develop in my company presents like this:
> project --- src (sources and headers)
>         |-- lib (libraries and archives)
>         |-- bin (binaries)
>         \-- tmp (temporary files)
> 
> I'm unable to set it in this way using CMake, because it always creates
> `CMakeFiles' directory in `project' and `src' dirs. I tried to change
> this behaviour by setting CMAKE_FILES_DIRECTORY to `tmp' but it doesn't
> work for me. The directory is being created but some of generated files
> (mostly from other modules) are still put into `CMakeFiles'. I was
> wondering if running CMake with -C option and a script with
> `CMAKE_BINARY_DIR' set to `tmp' might do the trick but since it is
> rather inelegant solution I'm asking you first.

cd tmp
cmake ..

HS


More information about the CMake mailing list