Update the documentation for the GenerateCppResourceFile module

This commit is contained in:
Robert Knight 2011-08-30 15:58:07 +01:00
parent ea8fcb4e82
commit 8af95a2726

View file

@ -5,15 +5,18 @@
# Currently only implemented for Unix. Requires the 'xxd'
# tool to be installed.
#
# INPUT_FILE : The name of the binary data file to be converted into a C++
# source file.
# TARGET_NAME : The name of the target to generate
#
# INPUT_DIR : The directory containing the input binary data file
#
# INPUT_FILE : The name of the binary data file in ${INPUT_DIR} to be converted into a C++
# source file. The name of the input file will be used as the basis for the
# symbols in the generated C++ file referring to the data buffer and its length.
#
# CPP_FILE : The path of the C++ source file to be generated.
# See the documentation for xxd for information on
# the structure of the generated source file.
#
# INPUT_FILE_TARGET : The name of the target which generates INPUT_FILE
#
function (generate_cpp_resource_file TARGET_NAME INPUT_DIR INPUT_FILE CPP_FILE)
add_custom_command(OUTPUT ${CPP_FILE} COMMAND cd ${INPUT_DIR} && xxd -i ${INPUT_FILE} ${CPP_FILE}
DEPENDS ${INPUT_DIR}/${INPUT_FILE})