Giter Site home page Giter Site logo

3rdparty

WIP

Basic idea is that if you include the file thirdparty.cmake in your build then you can specify 3rdparty packages that you need and they will get automagically downloaded and built for you. This is similar to the hunter package manager but designed to be A LOT simplier, i.e., we don't do anything smart to cache things built multiple times across different projects, etc.

This originated from the Apache Mesos code base where we refactored and extracted bits to make it work. It's still early days and there is a lot that needs to be done.

Basic usage, inside your CMakeLists.txt you'll do:

set(THIRDPARTY_URL "https://github.com/3rdparty/3rdparty/raw/master")
set(LIBRARY_LINKAGE STATIC)
set(LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})

include(thirdparty)

thirdparty(
  boost
  VERSION 1.65.0
  HASH SHA256=0442df595dc56e7da11665120ce9d92ec40c192eb060488131b346bac0938ba3)

thirdparty(
  glog
  VERSION 0.4.0
  HASH SHA256=F28359AEBA12F30D73D9E4711EF356DC842886968112162BC73002645139C39C)

Eventually we'll want to be able do set up things declaratively like:

thirdparty(
  grpc
  VERSION 0.4.0
  HASH SHA256=F28359AEBA12F30D73D9E4711EF356DC842886968112162BC73002645139C39C
  USE_LOCAL_OR_EXTERNAL
  LINK static
  DEPENDS zlib protobuf)

Adding Packages

When writing your own packages you can expect the following variables to be useful:

CMAKE_NOOP
CMAKE_FORWARD_ARGS
CMAKE_SSL_FORWARD_ARGS

Your .cmake file will be invoked after the invocation of thirdparty() and there will also be the following variables for you to use (including the versions of these variables for other packages that will have already been configured via thirdparty()):

PACKAGE_VERSION
PACKAGE_HASH
PACKAGE_TARGET         # Target folder where the package will be put.
PACKAGE_CMAKE_ROOT     # Where cmake will put the uncompressed source.
PACKAGE_ROOT           # Where things will be put during the various build stages.

These may be useful for creating a .cmake file for your package.

3rdparty's Projects

3rdparty doesnโ€™t have any public repositories yet.

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.