Skip to content

sivachandran/cmake-bin2h

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

bin2h.cmake

Pure CMake function to convert any file into C/C++ header, implemented with only CMake commands.

Example Usage

include(bin2h.cmake)
...
message("Embedding following files into header file ${HEADER_FILE}")
foreach(file ${SOURCE_FILES})
    message("   ${file}")

    get_filename_component(variableName ${file} NAME)

    bin2h(SOURCE_FILE ${file} HEADER_FILE ${HEADER_FILE} VARIABLE_NAME ${variableName} APPEND NULL_TERMINATE)
    file(APPEND ${HEADER_FILE} "\n")
endforeach()

About

Pure CMake function to convert any file into C/C++ header, implemented with only CMake commands.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages