Code Monkey home page Code Monkey logo

openssl-cmake's Introduction

OpenSSL-CMake

CMake script supplying OpenSSL libraries conveniently, encapsulating the OpenSSL build system on various platforms.

Features

  • Allows usage of system OpenSSL
  • Allows trivial and complex building of OpenSSL
  • Allows cross compilation, especially for Android
  • Defaults to prebuilt binaries

System OpenSSL

To use the system OpenSSL, simply set SYSTEM_OPENSSL=ON.

Prebuilt OpenSSL

Default behaviour is the download of a prebuilt binary. This is only intended as a convenience for debugging purposes and NOT for production use. Binaries are prebuilt for Windows (x86 and x86_64) and GNU/Linux (x86_64).

Build OpenSSL

In order to build OpenSSL, set BUILD_OPENSSL=ON along with the branch or tag name, for example OPENSSL_BRANCH=OpenSSL_1_1_0g.

General Cross Compile

Cross compilation is enabled using CROSS=ON and the target is specified using CROSS_TARGET=mingw along with the optional CROSS_PREFIX=mingw32-.

Android Cross Compile

Android requires a special CROSS_ANDROID=ON. Using OpenSSL-CMake from Gradle's native build does not require additional settings. Otherwise, it is required to set the general NDK variables ANDROID_NDK_ROOT, ANDROID_EABI, ANDROID_ARCH, ANDROID_API, ANDROID_MACHINE.

Usage

  1. Add OpenSSL-CMake as a submodule to your Git project using git submodule add <URL> external/openssl-cmake
  2. Initialize the submodule using git submodule update --init
  3. In your CMakeLists.txt include the directory using add_subdirectory(external/openssl-cmake)
  4. Link against ssl and crypto targets, which will also include the headers

Licensing

These scripts, unless otherwise stated, are subject to the MIT license.

openssl-cmake's People

Contributors

kleest avatar roussosalex avatar

Watchers

 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.