[CMake] can I install subdirs matching a REGEX ?

Martin Koller martin.koller at etm.at
Tue Dec 11 02:47:51 EST 2012


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.


More information about the CMake mailing list