[CMake] Installing an entire directory structure?
David Cole
david.cole at kitware.com
Thu Mar 31 18:00:54 EST 2005
There was a brief discussion along these lines just last week:
http://public.kitware.com/pipermail/cmake/2005-March/thread.html#6228
On Windows XP, you can use xcopy to do what you want. I don't know if cp
on Unix will give you a cross platform way to get this done via a CMake
invocation. See the thread mentioned above, particularly the last
response from Andy Cedilnik. To do what Andy says, see the latest
Mastering CMake book on pp. 54-55. It shows you how to use
POST_INSTALL_SCRIPT to run a *.cmake file after an install target is
installed. Use SET_TARGET_PROPERTIES to set the script and then have the
script do your copy for you. Also, as mentioned in the other thread, it
might be nice to consider adding a "copy this directory verbatim" option
to CMake in the future.
On Windows XP, works with or without dest_dir existing in the first place:
xcopy "source_dir" "dest_dir" /E /V /I /Q /H /R /K /Y
(Do xcopy /? to find out what all the switches mean.)
HTH,
David
Tanner Lovelace wrote:
>Greetings,
>
>The project I'm working on has a directory structure that
>just needs to be copied verbatim into the installation
>directory. Is there an easier way to do this other than specifying
>each a regex in each directory to be copied over? In other
>words, is there a way to basically do a recursive copy
>upon installation? Or am I thinking about this the wrong way?
>
>Thanks in advance,
>Tanner Lovelace
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>
>
>
>
More information about the CMake
mailing list