diff options
author | Malfurious <m@lfurio.us> | 2024-10-21 13:27:32 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-10-24 06:41:41 -0400 |
commit | d1aea038b08db11d5f12132b2842aba5fff8dd5a (patch) | |
tree | ec570a2bfb22e645d7e911a40b7acd249f955da6 | |
parent | 5494fc310acf0aabb9d828451331e44483eb21c7 (diff) | |
download | compass-d1aea038b08db11d5f12132b2842aba5fff8dd5a.tar.gz compass-d1aea038b08db11d5f12132b2842aba5fff8dd5a.zip |
Add Mbedtls library
I'm planning to start rewriting compass in C, so I've been looking for a
portable C-oriented crypto library to replace Crypto++. This commit
adds version 3.6.0 of mbedtls to the build.
Mbedtls is available under the Apache license.
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 9 | ||||
m--------- | mbedtls | 0 |
3 files changed, 11 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f1b208d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "mbedtls"] + path = mbedtls + url = https://github.com/Mbed-TLS/mbedtls diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f59811..e0fd0a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,10 @@ cmake_minimum_required(VERSION 3.0) -project(compass CXX) +project(compass LANGUAGES CXX) + +set(ENABLE_PROGRAMS OFF CACHE BOOL "Build mbedtls exemplary programs") +set(ENABLE_TESTING OFF CACHE BOOL "Build mbedtls testing harness") +add_subdirectory(mbedtls) +include_directories(mbedtls/include) add_executable(compass main.cpp @@ -11,4 +16,6 @@ add_executable(compass Socket.cpp ) +target_link_libraries(compass mbedtls) + install(TARGETS compass) diff --git a/mbedtls b/mbedtls new file mode 160000 +Subproject 2ca6c285a0dd3f33982dd57299012dacab1ff20 |