[CMake] Copying directories as post build events without losing parent directory

David Cole DLRdave at aol.com
Mon Dec 7 16:59:43 EST 2015


$ cmake -E copy_directory foo bar/foo

?


On Mon, Dec 7, 2015 at 4:53 PM, Robert Dailey <rcdailey.lists at gmail.com> wrote:
> I have a custom target which runs a command similar to this:
>
> $ cmake -E copy_directory foo bar
>
> The problem is that the contents of "foo" are copied inside of "bar",
> instead of it creating a directory "bar/foo" and putting the contents
> in there.
>
> Is there a way to make copy_directory behave like this? If not, I
> guess my only option is to create a little CMake script that runs
> file(INSTALL) to copy the directories like I want.
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list