Giter VIP home page Giter VIP logo

cmaker's Introduction

CMaker

This gem generate source files needed for CMakeLists.txt

Installation

Build and Install:

$ git clone https://github.com/shiyj/cmaker.git
$ cd cmaker
$ gem build cmaker.gemspec
$ gem install cmaker-x.x.x.gem

Usage

$ cd /path/to/your/project
$ cmaker -c
$ vi conf.yaml
$ cmaker

you will get a cmakelists.txt /path/to/your/project.

You Must Edit the conf.yaml file By Hand BEFORE you execute cmaker

You Must Edit the CMakeLists.txt file if you want to set other command options of cmake

conf.yaml

The conf.yaml is the config which was used to create the CMakeLists.txt. But the default file created by cmaker -c is useless to your Project, so you must edit it yourself.

  1. First, you should give the project a name after the key world project_name: ,
  2. Second, add the include header folders to include_dir: array,
  3. Third, add an subitem in library: or executable: array and each subitem must have three attribute: name: ,fold:,link_lib_name:

here is an examplye:

project_name: demo
include_dir: [lib]
library:
  [
    {name: geodemo,fold: [lib],link_lib_name: []}
  ]
executable:
  [
    {name: main,fold: [src],link_lib_name: [geodemo]}
  ]

This config tell cmaker that :

  1. I want to compile the source file in lib to a libary( a .dll/.lib or .so/.a), and the source file in src to a executable program.
  2. Besides, I named the library after 'geodemo' which will create a geodemo.dll or libgeodemo.so .
  3. The executable program main will link the library geodemo.dll or libgeodemo.so.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

cmaker's People

Contributors

shiyj avatar

Watchers

 avatar  avatar  avatar

Forkers

whztt07

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.