Skip to content

madeso/embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

embed project

add_subdirectory(embed)

embed(embedded
    AS_TEXT
        ../data/shader_vertex.glsl
    AS_BINARY
        ../data/container_diffuse.png
)

add_executable(example ${other_src} ${embedded})
target_include_directories(example PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_library(example PRIVATE embed)
#include "embed/types.h"
void load_image_from_embedded(const embedded_binary&);
void load_shader(std::string_view);

#include "shader_vertex.glsl.h"
void load_shader(SHADER_VERTEX_GLSL);

#include "container_diffuse.png.h"
load_image_from_embedded(CONTAINER_DIFFUSE_PNG);

About

embed binary or text via cmake in c++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published