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