GithubHelp home page GithubHelp logo

alamaison / gate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hunter-packages/gate

0.0 3.0 0.0 201 KB

Gate to hunter packages

Home Page: https://github.com/ruslo/hunter

License: BSD 2-Clause "Simplified" License

Python 100.00%

gate's Introduction

linux macosx
Build Status Build Status

This is a gate file to hunter package manager.

Usage

  • Copy file HunterGate.cmake to project
  • Include gate file: include("cmake/HunterGate.cmake")
  • Put any valid hunter archive with SHA1 hash:
HunterGate(
    URL "https://github.com/ruslo/hunter/archive/v0.7.0.tar.gz"
    SHA1 "e730118c7ec65126398f8d4f09daf9366791ede0"
)

Usage (custom config)

Optionally custom config.cmake file can be specified. File may has different locations:

  • GLOBAL. The one from hunter archive:
HunterGate(
    URL "https://github.com/ruslo/hunter/archive/v0.7.0.tar.gz"
    SHA1 "e730118c7ec65126398f8d4f09daf9366791ede0"
    GLOBAL myconfig
        # load `${HUNTER_SELF}/cmake/configs/myconfig.cmake` instead of
        # default `${HUNTER_SELF}/cmake/configs/default.cmake`
)
  • LOCAL. Default local config.
HunterGate(
    URL "https://github.com/ruslo/hunter/archive/v0.7.0.tar.gz"
    SHA1 "e730118c7ec65126398f8d4f09daf9366791ede0"
    LOCAL # load `${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/config.cmake`
)
  • FILEPATH. Any location.
HunterGate(
    URL "https://github.com/ruslo/hunter/archive/v0.7.0.tar.gz"
    SHA1 "e730118c7ec65126398f8d4f09daf9366791ede0"
    FILEPATH "/any/path/to/config.cmake"
)

Notes

  • Note that locations of libraries in HUNTER_ROOT directory depends on config.cmake => changes of config.cmake will be applied only after clearing cache. This is similar to work of find_package command. Even if it will be allowed to change config.cmake file on-the-fly, cached find_package variables will not change and new paths will not be applied.

  • You don't need to specify hunter_config command for all projects. Set version of the package you're interested in - others will be used from default config.cmake.

Effects

  • Try to detect hunter:
  • test cmake variable HUNTER_ROOT (control, shared downloads and builds)
  • test environment variable HUNTER_ROOT (recommended: control, shared downloads and builds)
  • test directory ${HOME}/HunterPackages (shared downloads and builds)
  • test directory ${PROGRAMFILES}/HunterPackages (shared downloads and builds, windows only)
  • test directory HunterPackages in current project sources (not recommended: no share, local downloads and builds)
  • If not detected - download it and set HUNTER_ROOT, HUNTER_BASE, HUNTER_SELF variables
  • Include hunter master file include("${HUNTER_SELF}/cmake/Hunter")
  • Include hunter_add_package module with corresponding function

On success this message will be printed:

-- [hunter] HUNTER_ROOT: /home/travis/HunterPackages
-- [hunter] HUNTER_SELF: /home/travis/HunterPackages/_Base/f46f105449f6c78e729f866237038b70d03ebcc8/Self

Examples

Links

gate's People

Contributors

alamaison avatar ruslo avatar

Watchers

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