Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmake #42

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add cmake #42

wants to merge 3 commits into from

Conversation

SMP33
Copy link

@SMP33 SMP33 commented Aug 19, 2020

When I used INCBIN with CMake I have an error like this:

  "C:\Users\UserName\AppData\Local\Temp\ccgFslxv.s: Assembler messages:"
  "C:\Users\UserName\AppData\Local\Temp\ccgFslxv.s:2549: Error: file not found: FileName.txt" .

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:

  1. 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.
  2. 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant