cmakegen

command module
v0.0.0-...-e42e09d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 8 Imported by: 0

README

cmakegen

A simple command line tool to generate a cmake project structure.

It automatically generates the configuration for pkg-config, install targets, and a standard CMakeLists.txt file.

Installation

go install github.com/abiiranathan/cmakegen

Usage

cmakegen -h
Usage of cmakegen:
  -configure
        Run cmake after generating the files
  -desc string
        Description of the project
  -generator string
        CMake generator to use (default "Ninja")
  -install
        Is the project installable (default true)
  -lang string
        Language of the project (default "C")
  -lib
        Is the project a library
  -linklibs string
        Linker libraries
  -name string
        Name of the project

If the project name is not provided, the current directory name is used as the project name, replacing spaces with underscores.

Example

cmakegen -name my_project -desc "My awesome project" -lang C -linklibs "pthread m" -configure

This will generate the following files in the working directory:

build/
include/
src/
    main.c
CMakeLists.txt
my_project.pc.in
my_projectConfig.cmake.in

If the -configure flag is provided, it will also run cmake in the build directory and generate the build files and targets.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL