Hi Martin,<br><br>if you only want to install files which match something, you need to add FILES_MATCHING to the insall() command (before the first pattern/regex), like this:<br><br>install(DIRECTORY start/ DESTINATION images FILES_MATCHING REGEX .*/\\.Images/.*)<br>
<br>(I've also added backslashes, since you probably want to match a literal period in ".Images")<br><br>Petr<br><br><div class="gmail_quote">On Tue, Dec 11, 2012 at 8:47 AM, Martin Koller <span dir="ltr"><<a href="mailto:martin.koller@etm.at" target="_blank">martin.koller@etm.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a directory tree, which contains a lot subtrees in different levels, all starting with ".Images"<br>
e.g.<br>
start/def/file1<br>
start/def/.Images/hello<br>
start/xyz/blaa/.Images/something<br>
<br>
There are a lot .Images subdirs and they are actually extracted from a tar file.<br>
What I want is to install all those subtrees starting with .Images to a destination.<br>
I tried with REGEX and PATTERN, e.g.:<br>
<br>
install(DIRECTORY start/ DESTINATION images REGEX .*/.Images/.*)<br>
<br>
but it does not work as it installs everything below start.<br>
<br>
Can I match ONLY DIRECTORY names which will then be used to install everything below it ?<br>
<br>
--<br>
Best regards/Schöne Grüße<br>
<br>
Martin<br>
<br>
A: Because it breaks the logical sequence of discussion<br>
Q: Why is top posting bad?<br>
<br>
() ascii ribbon campaign - against html e-mail<br>
/\ <a href="http://www.asciiribbon.org" target="_blank">www.asciiribbon.org</a> - against proprietary attachments<br>
<br>
This mail was not scanned before sending.<br>
It was sent from a secure Linux desktop.<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>