Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
goatgoose committed Jul 31, 2023
1 parent 011d15f commit ce37d0e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following commands can be used to build s2n-tls with minimal configuration o
# install build dependencies
brew install cmake ninja go
# MacOS does not have a supported libcrypto preinstalled, but OpenSSL can be installed with brew
# MacOS doesn't have a supported libcrypto preinstalled, but OpenSSL can be installed with brew
brew install openssl@3
# build s2n-tls
Expand Down Expand Up @@ -108,7 +108,7 @@ For more information on building AWS-LC, see the [Building AWS-LC documentation]

### Non-ninja CMake

s2n-tls can be built via CMake without a dependency on Ninja:
s2n-tls can be built with CMake without a dependency on Ninja:

<details open>
<summary>Ubuntu</summary>
Expand All @@ -120,22 +120,26 @@ CTEST_PARALLEL_LEVEL=$(nproc) ctest --test-dir build
```
</details>

### Traditional make
### Traditional Makefile

CMake is the preferred s2n-tls build system, and includes updated build features and supports the most platforms. However, building s2n-tls with a traditional Makefile is also supported. With make, the desired libcrypto install path must be set with the `LIBCRYPTO_ROOT` environment variable.
CMake is the preferred build system for s2n-tls since it includes updated build features and supports the most platforms. However, building s2n-tls with a traditional Makefile is also supported. With make, the desired libcrypto install path must be set with the `LIBCRYPTO_ROOT` environment variable.

<details open>
<summary>Ubuntu</summary>

```
LIBCRYPTO_ROOT=/usr/local/ssl make
```
</details>

## Consuming s2n-tls with CMake

When s2n-tls is built with CMake, scripts are installed that allow for s2n-tls to be found via the `find_package` CMake command. To include s2n-tls in your CMake application, define the following in your `CMakeLists.txt`:

````shell
````
find_package(s2n)
...
target_link_libraries(yourExecutableOrLibrary AWS::s2n)
````

If s2n-tls was installed to a global directory, such as `/usr/local`, CMake will automatically find s2n-tls. Otherwise, the s2n-tls install path can be specified with the `CMAKE_INSTALL_PREFIX` CMake option when building your application.
If s2n-tls was installed to a global directory, such as `/usr/local`, CMake will automatically find s2n-tls. Otherwise, the s2n-tls install path can be specified with the `CMAKE_INSTALL_PREFIX` option when building your application.

0 comments on commit ce37d0e

Please sign in to comment.