Giter Club home page Giter Club logo

cmake-generate-resources's Introduction

Using Resource Generators with CMake

This repository shows a simple example how you can use the xxd util (found on most Linux distributions) to generate a .h file that contains the binary data as one large array. You can add this file as a source to your application. But this example is not about xxd, it's about how you can use an custom command to generate something that your target (e.g. executable) needs. Some things to remember:

  • You use OUTPUT to identify the file that you will generate using your COMMAND entries.

  • Do not add the generated file to multiple different targets when also using parallel builds. The custom command will be executed for each target that needs it; doing this in parallel results in issues. See the manual for more info.

  • You can pass multiple COMMAND lines.

  • Make sure to add the generated OUTPUT to at least one target, otherwise it won't be executed.

cmake-generate-resources's People

Contributors

roxlu avatar

Watchers

 avatar  avatar

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.