Build with OpenSSL and MbedTLS for CI

This commit is contained in:
Cameron Gutman
2021-04-17 23:56:15 -05:00
parent 3979dbd082
commit 23a86b0455
2 changed files with 18 additions and 1 deletions

View File

@@ -2,9 +2,15 @@
cmake_minimum_required(VERSION 3.1)
project(moonlight-common-c LANGUAGES C)
option(USE_MBEDTLS "Use MbedTLS instead of OpenSSL" OFF)
SET(CMAKE_C_STANDARD 11)
find_package(OpenSSL 1.0.2 REQUIRED)
if(USE_MBEDTLS)
add_definitions(-DUSE_MBEDTLS)
else()
find_package(OpenSSL 1.0.2 REQUIRED)
endif()
aux_source_directory(src SRC_LIST)
aux_source_directory(enet SRC_LIST)

View File

@@ -15,9 +15,20 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
CC: gcc
CXX: g++
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
CC: clang
CXX: clang++
CMAKE_ARGS: -DUSE_MBEDTLS=ON
PREBUILD_CMD: sudo apt install libmbedtls-dev
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
CC: gcc
CXX: g++
CMAKE_ARGS: -DUSE_MBEDTLS=ON
PREBUILD_CMD: sudo apt install libmbedtls-dev
before_build:
- 'git submodule update --init --recursive'
- 'eval "$PREBUILD_CMD"'
build_script:
- 'mkdir build_debug'