Giter Site home page Giter Site logo

projectmeta.cmake's Introduction

CMake module to easily define meta data about your project


Usage

The easiest way to use ProjectMeta.cmake is by adding GetCPM.cmake to your project.

First add GetCPM.cmake module :

mkdir cmake
wget -O cmake/GetCPM.cmake https://raw.githubusercontent.com/cppmf/GetCPM.cmake/master/GetCPM.cmake

Then add the following lines to the project's CMakeLists.txt.

# include CPM.cmake module
include(cmake/GetCPM.cmake)

# add ProjectMeta.cmake
CPMAddPackage(
  NAME ProjectMeta.cmake
  GITHUB_REPOSITORY cppmf/ProjectMeta.cmake
  GIT_TAG 1.2.2
)

# then add meta data project before calling the project function
ProjectMeta(
        # Name of the project
        PROJECT_NAME "${PROJECT_NAME}"
        # Major version
        VERSION_MAJOR 1
        # Minor version
        VERSION_MINOR 0
        # Patch version
        # VERSION_PATCH 0
)

Available parameters

List of available parameters while calling ProjectMeta function

parameter description
PROJECT_ID project identifier
PROJECT_NAME project name
PROJECT_DESCRIPTION project description
PROJECT_NAMESPACE project namespace
PROJECT_COPYRIGHT project copyright
AUTHOR_ORGANIZATION project
AUTHOR_DOMAIN project domain url
AUTHOR_MAINTAINER project maintainer
VERSION_MAJOR version major
VERSION_MINOR version minor
VERSION_PATCH version patch
VERSION_REVISION version revision
VERSION version
VERSION_NAME version name

Available variables

After calling ProjectMeta function, the following variables will be set

! variable description
[C] PROJECT_ID project identifier
[C] PROJECT_ID_LOWER project identifier in lower case
[*] PROJECT_NAME project name
[C] PROJECT_NAME_LOWER project name in lower case
  • | PROJECT_DESCRIPTION | project description
  • | PROJECT_NAMESPACE | project namespace
  • | PROJECT_COPYRIGHT | project copyright
  • | PROJECT_URL | project url
  • | AUTHOR_ORGANIZATION | project organization
  • | AUTHOR_DOMAIN | project domain url
  • | AUTHOR_MAINTAINER | project maintainer [] | VERSION_MAJOR | version major [] | VERSION_MINOR | version minor [C] | VERSION_PATCH | version patch [C] | VERSION_REVISION | version revision [C] | VERSION | version (optional, will be built from version info if not set) [C] | VERSION_NAME | version name (optional, will be built from version info if not set)

[*] Mandatory meta data [C] Conditionals meta data which will be setup based on mandatory meta data.

projectmeta.cmake's People

Contributors

gennesseaux 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.