Hello everyone,<br><br>I have recently come across a little problem using CMake for my own C++ project.<br><br>I have a src tree like : <br>SOURCE_DIR/CMakeLists.txt<br>SOURCE_DIR/src/ (*.cpp)<br>SOURCE_DIR/include/ (*.h)<br>
SOURCE_DIR/data/ (*.*)<br>SOURCE_DIR/test/ (*.cpp)<br><br>I want to build it into a binary tree organised in a quite similar way, in case of users using the same value for SOURCE_DIR and BINARY_DIR to build.<br>But it is hard to keep the binary tree consistent with different compilers.
<br><br>Anyway with visual studio I end up with smoething like<br>BINARY_DIR/&lt;Target&gt;.dir/<br>BINARY_DIR/CMakeFile/<br>BINARY_DIR/CMakeTmp/<br>BINARY_DIR/debug/ (Targets outputs)<br><br>Then I want to move the files within /data that are needed to be able to run and debug my tests, without actually going nto the install part of my project yet.
<br>Therefore I assume that the right way to do it, would be to add a custom command for the build of the needed targets with the corresponding datafile.<br>But do I really need to do a<br><br>IF(WIN32) xcopy ...<br>IF (UNIX) cp ...
<br>etc. ???<br><br>Any idea about how should I do that properly ?<br><br>Thanks a lot !<br>