This sample code shows how to create an OpenSSL server application.
Prerequisites:
$ sudo apt-get install gcc pkg-config libssl-dev openssl| Hello World! |
$ sudo apt install build-essential pkg-config cmake ninja-build$ sudo apt install build-essential pkg-config cmake libx11-dev| # -------------------------------------------------- | |
| function (build_external_project target file_name) | |
| set(CMAKELIST_CONTENT " | |
| cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION}) | |
| project(build_external_project) | |
| file(MD5 \"${file_name}\" FILE_HASH) |
| #################################################################################################### | |
| # This function converts any file into C/C++ source code. | |
| # Example: | |
| # - input file: data.dat | |
| # - output file: data.h | |
| # - variable name declared in output file: DATA | |
| # - data length: sizeof(DATA) | |
| # embed_resource("data.dat" "data.h" "DATA") | |
| #################################################################################################### |