Giter Club home page Giter Club logo

cc.cmake's Introduction

Overview

This repository bundles all the CommsChampion Ecosystem projects into a single CMake one. It is expected to be used in another CMake project that has some CommsChampion Ecosystem dependencies and built using the ExternalProject_Add() cmake function with an appropriate configuration.

CMake Configuration

The major CMakeLists.txt contains a list of supported options and other configuration variables. All the projects are disabled by default. The CMake invocation is expected to use CMAKE_PROJECT_INCLUDE variable pointing to a file, which lists all the required projects to get compiled.

If one of the selected project depends on another (see DefaultConfig.cmake for details), the latter gets built even if it was not explicitly enabled.

The configuration file provided via the CMAKE_PROJECT_INCLUDE variable can also override / update the default configuration provided by this project by setting appropriate variables.

The supported variables are:

  • <PROJ_NAME>_SOURCE_DIR - Override the default source directory.
  • <PROJ_NAME>_GIT_REPOSITORY - Override the default project repository URL. To disable usage of the repository and use source directory (set by the <PROJ_NAME>_SOURCE_DIR) instead, set the <PROJ_NAME>_GIT_REPOSITORY value to _.
  • <PROJ_NAME>_GIT_TAG - Override the default tag.
  • <PROJ_NAME>_CMAKE_ARGS - Extra CMake arguments to be passed to the project. Use only project specific configuration, no need to set variables like CMAKE_GENERATOR, CMAKE_BUILD_TYPE, or CMAKE_CXX_STANDARD. They are all automatically inherited from this project.

The <PROJ_NAME> prefix is combined by the project name capitalized and every . (dot) character replaced with the _ (underscore). For example:

For example, to enable the MQTT5 client library (see cc.mqtt5.libs) while disabling build of provided client applications, the configuration file can have the following lines:

set (OPT_CC_MQTT5_LIBS ON)
list (APPEND CC_MQTT5_LIBS_CMAKE_ARGS -DCC_MQTT5_CLIENT_APPS=OFF)

In case a value of one of the variables provided via the <PROJ_NAME>_CMAKE_ARGS needs to contain a CMake list, then the separation of the values needs to be performed using the | character instead of usual ;.

list (APPEND CC_MQTT5_LIBS_CMAKE_ARGS -DCC_MQTT5_CUSTOM_CLIENT_CONFIG_FILES="/path/to/config1|/path/to/config2")

This project contains various configuration files for use and reference, please see the contents of the config folder.

cmake -DCMAKE_PROJECT_INCLUDE=config/All.cmake ...

Third Party Dependencies

Qt Dependency

Some projects (mostly cc_tools_qt and the relevant plugins) depend on the Qt library. To provide a path to the compiled libraries (required mostly on Windows platform) use standard CMAKE_PREFIX_PATH variable passed to this project. It will be propagated to all other projects.

cmake -DCMAKE_PREFIX_PATH=C:\Qt6 ...

All the projects in the CommsChampion Ecosystem are expected to support both Qt5 and Qt6. To overwrite the default Qt major version (currently Qt5) use the OPT_QT_MAJOR_VERSION CMake variable.

cmake -DOPT_QT_MAJOR_VERSION=6 ...

Boost Dependency

Some projects (mostly command line applications in the libraries projects) depend on Boost. It is expected to use the relevant variables described in the FindBoost documentation to help with finding appropriate boost libraries. All the provided boost configuration variables will be passed to the relevant projects as well.

cmake -DBOOST_ROOT=C:\boost -DBoost_USE_STATIC_LIBS=ON ...

cc.cmake's People

Contributors

arobenko avatar

Stargazers

 avatar

Watchers

 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.