Coder Social home page Coder Social logo

warmist / file_to_obj Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 20 KB

Converts any file to linkable x64 obj file for msvc. This way you don't need to compile C file (e.g. from xd) and you dont need to mess with resource files etc...

CMake 20.76% C++ 79.24%
utility programming linking msvc

file_to_obj's Introduction

file_to_obj

Converts any file to linkable x64 obj file for msvc. This way you don't need to compile C file (e.g. from xd) and you dont need to mess with resource files etc...

Usage

For use with cmake:

  • Put the included (in assets dir) EmbedFileFTO.cmake into your CMAKE_MODULE_PATH
  • include("cmake/EmbedFileFTO.cmake") somewhere in your cmakelists.txt
  • embed_file( <LIST OF FILES TO EMBED> )
  • add to add_executable(...) optionaly: ${EMBEDDED_HDRS} and mandatory: ${EMBEDDED_LIBS}
  • include_directories(${PROJECT_BINARY_DIR}) because i forget if it already looks for headers there?
  • in your cpp file #include "<EMBEDED FILE NAME>.hpp" and it will contain: EMB_FILE_<FILE NAME> and EMB_FILE_SIZE_<FILE NAME>
  • Have fun!

WHY?

Not sure... Probably sanity is getting low... And i liked the ld having that power and basically alternatives: here

Resources

file_to_obj's People

Contributors

warmist avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lygon901

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.