Giter Site home page Giter Site logo

radioo / botan-cmake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tectu/botan-cmake

0.0 0.0 0.0 17 KB

Easy botan integration into cmake projects using automatically generated amalgamation files.

License: The Unlicense

C++ 8.07% CMake 91.93%

botan-cmake's Introduction

Overview

This repository provides FindBotan.cmake which allows for easily inclusion of Botan into CMake based projects.

Unlike other CMake integrations for Botan, this one does not simply add all the Botan files to a target. Instead, it does the following automagically:

  1. Download the requested version of Botan.
  2. Run Botan's python script to generate the amalgamation files botan_all.h and botan_all.cpp.
  3. Provides a CMake target to compile & link those amalgamation files.

Refer to Botan's The Amalgamation Build documentation for more information on the amalgamation build.

Licensing

Code provided by this repository is considered to be public domain using the Unlicense license. However, note that Botan ships with its own licensing.

Usage

To use this Botan CMake integration:

  1. Download/copy cmake/FindBotan.cmake from this repository to your local CMake project.
  2. Add that CMake script to your CMake module path (CMAKE_MODULE_PATH).
  3. Use find_package() to "include" that CMake script in your project. Do not specify any components.
  4. Use the botan_generate() function to generate a target with specific Botan modules enabled.
  5. Use target_link_libraries() to link to the generated CMake target.
  6. Include botan_all.h where needed.

An example project is provided under /example.

Your CMakeLists.txt:

# Find Botan
find_package(
    botan 2.18.2
    REQUIRED
)

# Create target "botan_test" with modules "system_rng" and "sha3" enabled
botan_generate(
    botan_test
        system_rng
        sha3
)

# Link to generated target
target_link_libraries(
    MyTarget
    PRIVATE
        botan_test
)

botan-cmake's People

Contributors

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