Having CMake put generated binaries in a specific directory structure with assets

My project's directory structure is basically as follows:

root/src

root/assets

root/library

I currently have CMake set up to compile the source, compile the library, and then link them, by calling make from the root directory.

I then have to manually move the executable into the original assets directory to get it to run, since that's where it expects to be (and we want to test with our directory structure in assets as close to what we expect it to be when it's done).

So, is there any way to tell CMake to automatically stick the compiled binary in that directory, as well as copy the assets over? Since we're doing out of source builds, sticking the executable back into the original project source's assets folder seems odd.

In short, two questions: Is there any way to get CMake to copy assets as well as code, and is there any way to have it copy the generated executable to a specific location in the build tree?

Any help would be appreciated --- thank you!

7
задан Kozaki 8 February 2011 в 00:29
поделиться