Giter Club home page Giter Club logo

kydeps's Introduction

TODO

WIP: This is outdated... needs to be refreshed.

  • introduce a mixed mode where we downloaded if available and build otherwise
  • introduce different types of dependencies (build time vs. runtime)

kydeps

TL;DR:

  1. create a new cmake-based project
    1. add kydeps submodule with git submodule add https://github.com/kyotov/kydeps.git kydeps

    2. create a main.cpp as follows:

      #include <glog/logging.h>
      
      int main() {
          LOG(INFO) << "Hello, World!" << std::endl;
          return 0;
      }
    3. create a CMakeLists.txt as follows:

      cmake_minimum_required(VERSION 3.18)
      
      project(kydeps_test)
      
      set(CMAKE_CXX_STANDARD 20)
      
      include(kydeps/KyDeps.cmake)
      KyDeps(#CACHED
          DEPENDS gflags glog
          EXPECTED_SHA256 f4a3efc5d13a420d75aa64d319ae9ef14fe26420872bd86664666e05a323cf0d)
      
      add_executable(kydeps_test main.cpp)
      target_link_libraries(kydeps_test
          gflags
          glog::glog)
    4. configure the project with cmake -STATEMENT ... -B .... among other things, this will:

      1. build gflags and glog as external projects
      2. make them available to your code using find_package
      3. generate <git-sha>-<os>-Debug-gflags-glog.zip
    5. build the project with cmake --build ...

    6. execute the example binary

If you update the kydeps submodule to revision e3eaecfddc822b46f4b330876e9709e49586156b you may be able to play with uncommenting CACHED in the makefile and the dependencies will be downloaded from AWS/S3 instead of built.

// find_package(nginx REQUIRED NO_MODULE)

find_program(NGINX
    REQUIRED
    NAMES nginx
    PATHS "${CMAKE_BINARY_DIR}/_deps/nginx/nginx_85fd5a860268ba76bb744e4d086381816f2911a1/install"
    NO_DEFAULT_PATH)

cmake -D KYDEPS_UPLOAD=TRUE -D KYDEPS_PACKAGE_CACHE_FROZEN=TRUE -P build.cmake

kydeps's People

Contributors

ashishvthakkar avatar kyotov 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.