[CMake] How to recursively copy directories and subdirectories...

Michael Hertling mhertling at online.de
Fri Feb 24 22:23:38 EST 2012


On 02/25/2012 03:16 AM, Sumit Kumar wrote:
> Hello 
> 
> I would like to recursively copy folders/subfolders when I do a make install. In addition, I would like to copy certain file patterns (typically *.h) files that may be in these folders. I can do this for individual files (by doing a  glob / glob recurse). However, in doing this I lose the directory structure. Any help will be appreciated.
> 
>  
> Thanks and Regards
> Sumit

INSTALL(DIRECTORY ...) with FILES_MATCHING/PATTERN/REGEX/EXCLUDE options.

Regards,

Michael


More information about the CMake mailing list