Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.08 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.08 KB

README

Overview

Build Status

Cross platform tool for embedding resources into the binaries

CMake Initialization

Supports either git-submodule or vcpkg / cmake-package based initialization

    # Git Submodule https://github.com/ankurvdev/embedresource
    add_subdirectory(embedresource)

OR

    # CMake pre-installed location
    find_package(EmbedResource REQUIRED)

CMake Integration

    find_package(EmbedResource REQUIRED)
    add_resource_library(foo OBJECT RESOURCE_COLLECTION_NAME bar RESOURCES "bar1.bin;bar2.bin")
    target_link_libraries(main PRIVATE foo)

Code

#include <EmbeddedResource.h>
#include <iostream>

DECLARE_RESOURCE_COLLECTION(foo);

int main(int argc, char* argv[])
{
    auto resourceCollection = LOAD_RESOURCE_COLLECTION(foo);
    for (auto const r : resourceCollection) { std::cout << r.string(); }
    return 0;
}