How to copy directory from source tree to binary tree?

Since version 2.8, the file command has a COPY sub-command:

file(COPY yourDir DESTINATION yourDestination)

Note that:

Relative input paths are evaluated with respect to the current source
directory, and a relative destination is evaluated with respect to the
current build directory

Leave a Comment