visual studio 2005 - cmake: How to make a script for copying Data files accompanying my program -


I'm trying to automate my building process with cmake. There is currently only one problem:

In the Limiter's philosophy (where there is one), the data is the best place to copy files.

I have a library and some example examples require data.

I currently do the following:

I use CMAKE_CURRENT_BINARY_DIR post-build phase of all data using custom command in CMakeLists.txt of each example. I use it in my debugging workflow, so no goal is established.

It works very well, but there are some drawbacks in it:

  1. Copy is created every time the project is created. This happens sometimes with VS 2005 when it is not newly created. Since the data folders are large, it takes time to copy, and it gets a bit upset.
  2. I'm sure this is a very strange way of doing this.

I want to copy those directories to executable paths, so I do not need to indicate how to set a debug working directory

Copy these directories The right time to do is to be at CMK configuration / generation time, at least I think I should do this, and how do I do this?

As you've seen recently, you can use it to copy the files directory: < / P>

  configure_file ($ {CMAKE_CURRENT_SOURCE_DIR} /input.txt $ {CMAKE_CURRENT_BINARY_DIR} /output.txtCopyonly)  

It does this once at the time of creation and Only when necessary.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -