diff --git a/.appveyor.yml b/.appveyor.yml index 3ae51d15..889d0619 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,14 +7,17 @@ build: verbosity: detailed configuration: + - Debug - Release platform: - x64 + - x86 environment: matrix: - - arch: Win64 + - STATIC: " " + - STATIC: "-static" matrix: fast_finish: true @@ -27,13 +30,23 @@ install: - ninja --version before_build: - - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 + - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% build_script: - mkdir build - cd build - - cmake .. -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -G Ninja + - cmake .. -DVCPKG_TARGET_TRIPLET=%PLATFORM%-windows%STATIC% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DENABLE_SDL=TRUE -G Ninja - ninja +# only debug builds are console mode apps, in them test --help +for: +- + matrix: + except: + - configuration: Release + + test_script: + - .\visualboyadvance-m.exe --help + cache: - - c:\projects\vcpkg\installed + - c:\vcpkg\installed diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f49cdd5..dc5af739 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,8 +15,19 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) set(VCPKG_DEPS zlib libpng SDL2 SFML gettext wxWidgets) +if(NOT DEFINED ENV{APPVEYOR}) + # job goes over time limit if building ffmpeg + list(APPEND VCPKG_DEPS ffmpeg) +endif() + include(Set-Toolchain-vcpkg) +set(VBAM_STATIC_DEFAULT OFF) + +if(VCPKG_TARGET_TRIPLET MATCHES -static OR CMAKE_TOOLCHAIN_FILE MATCHES mxe) + set(VBAM_STATIC_DEFAULT ON) +endif() + project(VBA-M C CXX) cmake_minimum_required(VERSION 2.8.12) @@ -41,7 +52,7 @@ option(ENABLE_WX "Build the wxWidgets port" ON) option(ENABLE_DEBUGGER "Enable the debugger" ON) option(ENABLE_ASAN "Enable -fsanitize=