How can I install a hierarchy of files using CMake?

The simplest way to install everything from a given directory is:

install(DIRECTORY mydir/ DESTINATION dir/newname)

Trailing “https://stackoverflow.com/” is significant.
Without it mydir would be installed to newname/mydir.

From the CMake documentation:

The last component of each directory name is appended to the destination
directory but a trailing slash may be used to avoid this because it
leaves the last component empty.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)