Giter Club home page Giter Club logo

aoe_cmake_kit's Introduction

aoe_cmake_kit

build status

Just some cmake tools for lazy people like me :)

Examples and docs (not yet) can be found at aoe cmake kit tutorial.

Features

  • Easy to use
  • Wrap install() for targets
  • Protobuf support
  • ROS support
  • Customizable default behaviors (target layout and install layout)
  • Project summary for feature extensions
  • Can be hooked everywhere

Import the Kit

You can use the following codes to import this kit:

include(FetchContent)
FetchContent_Declare(aoe_cmake_kit GIT_REPOSITORY https://github.com/Yarten/aoe_cmake_kit.git GIT_TAG main)
FetchContent_MakeAvailable(aoe_cmake_kit)

Simple Example

Suppose you have a cmake project as shown below:

.
├── CMakeLists.txt
├── include
│   └── demo
│       └── lib.h
├── src
│   ├── exe
│   │   └── main.cpp
│   └── lib
│       └── lib.cpp
└── test
    └── lib
        └── main.cpp

There is a 'lib' target which has its own test executable. In addition, the 'exe' target depends on the 'lib' target.

Using this kit, the code in CMakeLists.txt could look like this:

cmake_minimum_required(VERSION 3.16)

# -------------------------------------------------------------
# Import aoe cmake kit ('main' branch)
include(FetchContent)
FetchContent_Declare(aoe_cmake_kit GIT_REPOSITORY https://github.com/Yarten/aoe_cmake_kit.git GIT_TAG main)
FetchContent_MakeAvailable(aoe_cmake_kit)

# -------------------------------------------------------------
# Create the aoe project
aoe_project(NAME SimpleExample VERSION 1.2.3 VERSION_NAME banana)

# -------------------------------------------------------------
# Create a library target, an executable test target,
# and an executable target that using the library target.

aoe_add_library(lib)
aoe_add_executable_test(lib)
aoe_add_executable(exe DEPEND lib)

# -------------------------------------------------------------
# Complete the project
aoe_project_complete()

It is worth mentioning that the installation process for both the library target and the executable target mentioned above is defined by the kit. The kit can do a lot for you !

aoe_cmake_kit's People

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kanonwy

aoe_cmake_kit's Issues

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.