Skip to content

Instantly share code, notes, and snippets.

View StevenAWhite's full-sized avatar

Steven A White StevenAWhite

View GitHub Profile
@StevenAWhite
StevenAWhite / bin2h.cmake
Created September 25, 2020 17:40 — forked from sivachandran/bin2h.cmake
Pure CMake function to convert any file into C/C++ header, implemented with only CMake commands.
include(CMakeParseArguments)
# Function to wrap a given string into multiple lines at the given column position.
# Parameters:
# VARIABLE - The name of the CMake variable holding the string.
# AT_COLUMN - The column position at which string will be wrapped.
function(WRAP_STRING)
set(oneValueArgs VARIABLE AT_COLUMN)
cmake_parse_arguments(WRAP_STRING "${options}" "${oneValueArgs}" "" ${ARGN})