Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I used INCBIN with CMake I have an error like this:
This happens because the compiler cannot find the file in the build directory.
With this macro you can automatically copy used files with a template [filename].incbin.[file extension]
from directory [input_dir_absolute_path] to directory [output_dir_absolute_path].
Сopied files will looks like [filename].[file extension].
Usage:
move_incbin_to_destination([input_dir_absolute_path] [output_dir_absolute_path])
This copy files from [input_dir_absolute_path] to [output_dir_absolute_path] and remove ".incbin" from them names.
move_incbin_to_destination([input_dir_absolute_path] [output_dir_absolute_path] RECURSE)
This copy files from [input_dir_absolute_path]/[recursive all child folders] to
[output_dir_absolute_path]/[recursive all child folders from input dir] and remove ".incbin" from them names.
Typical usage is (including quotes):
move_incbin_to_destination( "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" RECURSE)
You can find examples in folder "test".