This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,951 additions
and
819 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
find_package(PkgConfig) | ||
if(PKG_CONFIG_FOUND) | ||
pkg_search_module(LUA lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua-5.0 lua5.0 lua50 lua) | ||
endif() | ||
pkg_search_module(LUA lua53 lua-5.3 lua5.3 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua-5.0 lua5.0 lua50 lua) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Try to find mbedTLS library | ||
# | ||
# Once done this will define | ||
# MBEDTLS_FOUND | ||
# MBEDTLS_INCLUDE_DIR | ||
# MBEDTLS_LIBRARIES | ||
# MBEDTLS_VERSION_MAJOR | ||
# MBEDTLS_VERSION_MINOR | ||
# MBEDTLS_VERSION_PATCH | ||
# MBEDTLS_VERSION | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/ssl.h) | ||
find_library(MBEDTLS_LIB NAMES mbedtls) | ||
find_package_handle_standard_args(MBEDTLS REQUIRED_VARS MBEDTLS_INCLUDE_DIR MBEDTLS_LIB) | ||
|
||
if( ${MBEDTLS_LIBRARIES-NOTFOUND} ) | ||
message(FATAL_ERROR "Failed to get info from Mbedtls library, check your Mbedtls installation") | ||
set(MBEDTLS_FOUND False) | ||
return() | ||
endif() | ||
|
||
execute_process( | ||
COMMAND bash -c "echo \"#include <mbedtls/version.h>\n#include <stdio.h>\nint main(){printf(MBEDTLS_VERSION_STRING);return 0;}\">a.c;cc a.c -I${MBEDTLS_INCLUDE_DIR} ${MBEDTLS_LIBRARIES} ;./a.out;rm -f a.c a.out" | ||
OUTPUT_VARIABLE MBEDTLS_VERSION | ||
) | ||
|
||
string(REPLACE "." ";" MBEDTLS_VERSION_LIST ${MBEDTLS_VERSION}) | ||
|
||
list(GET ${MBEDTLS_VERSION_LIST} 0 MBEDTLS_VERSION_MAJOR) | ||
list(GET ${MBEDTLS_VERSION_LIST} 1 MBEDTLS_VERSION_MINOR) | ||
list(GET ${MBEDTLS_VERSION_LIST} 2 MBEDTLS_VERSION_PATCH) | ||
|
||
if( ${MBEDTLS_VERSION} VERSION_LESS "2.1.0") | ||
message(FATAL_ERROR "Mbedtls 2.1+ is required for compiling ${PROGNAME} (current is ${MBEDTLS_VERSION}).") | ||
set(MBEDTLS_FOUND False) | ||
return() | ||
endif() | ||
|
||
find_library(MBEDX509_LIB NAMES mbedx509) | ||
find_library(MBEDCRYPTO_LIB NAMES mbedcrypto) | ||
set(MBEDTLS_LIBRARIES ${MBEDX509_LIB} ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB}) | ||
|
||
set(MBEDTLS_FOUND True) | ||
mark_as_advanced( | ||
MBEDTLS_FOUND | ||
MBEDTLS_INCLUDE_DIR | ||
MBEDTLS_LIBRARIES | ||
MBEDTLS_VERSION_MAJOR | ||
MBEDTLS_VERSION_MINOR | ||
MBEDTLS_VERSION_PATCH | ||
MBEDTLS_VERSION | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.