configure_file()

configure_file

Copy a file to another location and modify its contents.

configure_file(<input> <output>
               [COPYONLY] [ESCAPE_QUOTES] [@ONLY]
               [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])

Copies an <input> file to an <output> file and substitutes variable values referenced as @VAR@ or ${VAR} in the input file content. Each variable reference will be replaced with the current value of the variable, or the empty string if the variable is not defined. Furthermore, input lines of the form:

#cmakedefine VAR ...

will be replaced with either:

#define VAR ...

or:

/* #undef VAR */

depending on whether VAR is set in CMake to any value not considered a false con