diff --git a/.appveyor-vcpkg.yml b/.appveyor-vcpkg.yml index 62ef578d8..cb581e9c9 100644 --- a/.appveyor-vcpkg.yml +++ b/.appveyor-vcpkg.yml @@ -1,5 +1,5 @@ image: - - Visual Studio 2017 + - Visual Studio 2019 build: parallel: true @@ -13,8 +13,8 @@ environment: APPVEYOR_SAVE_CACHE_ON_ERROR: true matrix: + - platform: ARM - platform: x86 - - platform: x64 cache: @@ -22,25 +22,33 @@ cache: init: - set TARGET_PLATFORM= - - if "%platform%"=="x64" ( set TARGET_PLATFORM= Win64) - - if "%platform%"=="ARM" ( set TARGET_PLATFORM= ARM) + - if "%platform%"=="x86" ( set TARGET_PLATFORM=Win32) + - if "%platform%"=="x64" ( set TARGET_PLATFORM=x64) + - if "%platform%"=="ARM" ( set TARGET_PLATFORM=ARM) - echo %TARGET_PLATFORM% - echo %APPVEYOR_BUILD_WORKER_IMAGE% - - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set "generator=Visual Studio 15 2017%TARGET_PLATFORM%" && set "toolset=v141_xp" ) + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set "generator=Visual Studio 16 2019" && set "toolset=v142" ) - echo %generator% - echo %toolset% install: # make sure the latest version of git is installed - - choco upgrade git -y - - vcpkg install glib:%platform%-windows + - choco upgrade git ninja -y + - ninja --version + - cmake --version +# manually update vcpkg + - cd "C:\Tools\vcpkg" + - git pull + - .\bootstrap-vcpkg.bat + - cd %appveyor_build_folder% + - vcpkg install glib:%platform%-windows || type C:\Tools\vcpkg\buildtrees\libffi\config-arm-windows-out.log build_script: - mkdir build - cd build - - cmake -Werror=dev -G "%generator%" -T "%toolset%" -Denable-pkgconfig=0 -DCMAKE_TOOLCHAIN_FILE=c:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DNO_GUI=1 .. + - cmake -Werror=dev -G "%generator%" -A %TARGET_PLATFORM% -T "%toolset%" -Denable-pkgconfig=0 -DCMAKE_TOOLCHAIN_FILE=c:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. - cmake --build . --config Release # build libfluidsynth and fluidsynth exec - - cmake --build . --config Release --target check # build and exec unittests + - if not "%platform%"=="ARM" ( cmake --build . --config Release --target check ) # build and exec unittests, unless when cross-compiling after_build: - 7z a fluidsynth-vcpkg-%platform%.zip %APPVEYOR_BUILD_FOLDER%\build\src\Release\* diff --git a/README.md b/README.md index 38fa1d65c..26c30123a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # FluidSynth -| Build Status | glib < 2.30 | glib >= 2.30 | -|---|---|---| -| **Linux** | n.a. | [![Build Status Travis](https://travis-ci.org/FluidSynth/fluidsynth.svg?branch=master)](https://travis-ci.org/FluidSynth/fluidsynth/branches) | -| **FreeBSD** | n.a. | [![Build Status](https://api.cirrus-ci.com/github/FluidSynth/fluidsynth.svg?branch=master)](https://cirrus-ci.com/github/FluidSynth/fluidsynth) | -| **Windows** | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.Win?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=3&branchName=master) | [![Build status](https://ci.appveyor.com/api/projects/status/anbmtebt5uk4q1it/branch/master?svg=true)](https://ci.appveyor.com/project/derselbst/fluidsynth-g2ouw/branch/master) | -| **MacOSX** | n.a. | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.macOS?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=5&branchName=master) | -| **Android** | n.a. | [![CircleCI](https://circleci.com/gh/FluidSynth/fluidsynth/tree/master.svg?style=shield)](https://circleci.com/gh/FluidSynth/fluidsynth) | +| | Build Status | +|---|---| +| **Linux** | [![Build Status Travis](https://travis-ci.org/FluidSynth/fluidsynth.svg?branch=master)](https://travis-ci.org/FluidSynth/fluidsynth/branches) | +| **FreeBSD** | [![Build Status](https://api.cirrus-ci.com/github/FluidSynth/fluidsynth.svg?branch=master)](https://cirrus-ci.com/github/FluidSynth/fluidsynth) | +| **Windows** | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.Win?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=3&branchName=master) | +| **Windows (vcpkg)** | [![Build status](https://ci.appveyor.com/api/projects/status/anbmtebt5uk4q1it/branch/master?svg=true)](https://ci.appveyor.com/project/derselbst/fluidsynth-g2ouw/branch/master) | +| **MacOSX** | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.macOS?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=5&branchName=master) | +| **Android** | [![CircleCI](https://circleci.com/gh/FluidSynth/fluidsynth/tree/master.svg?style=shield)](https://circleci.com/gh/FluidSynth/fluidsynth) | @@ -20,7 +21,7 @@ FluidSynth generates audio by reading and handling MIDI events from MIDI input d The central place for documentation and further links is our **wiki** here at GitHub: -**https://github.com/FluidSynth/fluidsynth/wiki** +#### https://github.com/FluidSynth/fluidsynth/wiki If you are missing parts of the documentation, let us know by writing to our mailing list. Of course, you are welcome to edit and improve the wiki yourself. All you need is an account at GitHub. Alternatively, you may send an EMail to our mailing list along with your suggested changes. Further information about the mailing list is available in the wiki as well. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e043b91e1..356bb7349 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -402,10 +402,22 @@ endif ( MACOSX_FRAMEWORK ) # ******* Auto Generated Lookup Tables ****** include(ExternalProject) + +set (GENTAB_SDIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables) +set (GENTAB_BDIR ${CMAKE_CURRENT_BINARY_DIR}/gentables) + +# Use external project to ensure that cmake uses the host compiler when building make_tables.exe +# To fix cross-compiling fluidsynth from Win32 to ARM (using vcpkg), we need to pass the current generator +# on to the external project, otherwise (for some unknown reason) the target compiler will be used rather +# than the host compiler. ExternalProject_Add(gentables DOWNLOAD_COMMAND "" - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables - INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" + SOURCE_DIR ${GENTAB_SDIR} + BINARY_DIR ${GENTAB_BDIR} + CONFIGURE_COMMAND + "${CMAKE_COMMAND}" -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE} -G "${CMAKE_GENERATOR}" -B "${GENTAB_BDIR}" "${GENTAB_SDIR}" + BUILD_COMMAND + "${CMAKE_COMMAND}" --build "${GENTAB_BDIR}" + INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/" ) add_dependencies(libfluidsynth-OBJ gentables)