# The COPY signature copies files, directories, and symlinks to a destination folder. # 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. # Copying preserves input file timestamps, and optimizes out a file if it exists at the destination with the same timestamp. # Copying preserves input permissions unless explicit permissions or NO_SOURCE_PERMISSIONS are given (default is USE_SOURCE_PERMISSIONS).
# If FOLLOW_SYMLINK_CHAIN is specified, COPY will recursively resolve the symlinks at the paths given until a real file is found, and install a corresponding symlink in the destination for each symlink encountered. # For each symlink that is installed, the resolution is stripped of the directory, leaving only the filename, meaning that the new symlink points to a file in the same directory as the symlink. # This feature is useful on some Unix systems, where libraries are installed as a chain of symlinks with version numbers, with less specific versions pointing to more specific versions. # FOLLOW_SYMLINK_CHAIN will install all of these symlinks and the library itself into the destination directory. # For example, if you have the following directory structure: