mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-03 00:06:02 +00:00
Add AppVeyor CI builds
This commit is contained in:
parent
0ead0df2a1
commit
ac6630ef59
37
CMakeLists.txt
Normal file
37
CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(moonlight-common-c LANGUAGES C)
|
||||||
|
|
||||||
|
SET(CMAKE_C_STANDARD 11)
|
||||||
|
|
||||||
|
find_package(OpenSSL 1.0.2 REQUIRED)
|
||||||
|
|
||||||
|
aux_source_directory(src SRC_LIST)
|
||||||
|
aux_source_directory(enet SRC_LIST)
|
||||||
|
aux_source_directory(reedsolomon SRC_LIST)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
add_compile_options(/W4 /wd4100 /wd4232)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1 -D_CRT_NONSTDC_NO_DEPRECATE=1)
|
||||||
|
link_libraries(ws2_32.lib qwave.lib winmm.lib)
|
||||||
|
else()
|
||||||
|
add_compile_options(-Wall -Wextra -Wno-unused-parameter)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||||
|
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||||
|
add_definitions(-DLC_DEBUG)
|
||||||
|
else()
|
||||||
|
add_definitions(-DNDEBUG)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_definitions(-DHAS_SOCKLEN_T)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/enet/include
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/reedsolomon
|
||||||
|
${OPENSSL_INCLUDE_DIR})
|
||||||
|
|
||||||
|
link_libraries(${OPENSSL_CRYPTO_LIBRARY})
|
||||||
|
|
||||||
|
add_library(moonlight-common-c SHARED ${SRC_LIST})
|
37
appveyor.yml
Normal file
37
appveyor.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
clone_depth: 1
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
CMAKE_ARGS: -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -A Win32
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
CMAKE_ARGS: -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -A x64
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: macOS
|
||||||
|
BUILD_TARGET: macos
|
||||||
|
CMAKE_ARGS: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
|
||||||
|
CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
|
||||||
|
before_build:
|
||||||
|
- 'git submodule update --init --recursive'
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- 'mkdir build_debug'
|
||||||
|
- 'cd build_debug'
|
||||||
|
- sh: 'cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug ..'
|
||||||
|
- cmd: 'cmake %CMAKE_ARGS% -DCMAKE_BUILD_TYPE=Debug ..'
|
||||||
|
- sh: 'cmake --build .'
|
||||||
|
- cmd: 'cmake --build . --config Debug'
|
||||||
|
- 'cd ..'
|
||||||
|
- 'mkdir build_release'
|
||||||
|
- 'cd build_release'
|
||||||
|
- sh: 'cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release ..'
|
||||||
|
- cmd: 'cmake %CMAKE_ARGS% -DCMAKE_BUILD_TYPE=Release ..'
|
||||||
|
- sh: 'cmake --build .'
|
||||||
|
- cmd: 'cmake --build . --config Release'
|
||||||
|
|
||||||
|
deploy: off
|
Loading…
x
Reference in New Issue
Block a user