Skip to content

Commit

Permalink
Update the documentation for the GenerateCppResourceFile module
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Aug 30, 2011
1 parent ea8fcb4 commit 8af95a2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cmake/modules/GenerateCppResourceFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
# 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
#
# 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_DIR : The directory containing the input binary data file
#
# INPUT_FILE_TARGET : The name of the target which generates INPUT_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.
#
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}
Expand Down

0 comments on commit 8af95a2

Please sign in to comment.