Skip to content

Commit

Permalink
Preliminary support of meson builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmiles32 committed Dec 16, 2017
1 parent 8ed7659 commit 66df9a7
Show file tree
Hide file tree
Showing 28 changed files with 670 additions and 66 deletions.
97 changes: 52 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,51 +29,58 @@ env:
- DBG_COUNT=1
- DBG_COMPARE=1
- COUNT_INSTR=1

install:
- export PATH="`pwd`/build:${PATH}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip && unzip -q ninja-linux.zip -d build; fi
- pip3 install meson

script:
- make -C projects/unix V=1 clean && LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make SDL_CONFIG=sdl-config CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix V=1 all
- make -C projects/unix V=1 clean && LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make SDL_CONFIG=sdl2-config CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix V=1 all
- meson builddir
- ninja -C builddir

# TODO: MXE not yet ported to meson
# extra mxe build entries
matrix:
include:
- env:
- MXE_CPU=i686
- PATH="/usr/lib/mxe/usr/bin/:$PATH"
addons:
apt:
sources:
- sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
packages:
- mxe-i686-w64-mingw32.shared-gcc
- mxe-i686-w64-mingw32.shared-sdl2
- mxe-i686-w64-mingw32.shared-freeglut
- mxe-i686-w64-mingw32.shared-freetype
- mxe-i686-w64-mingw32.shared-libpng
- mxe-i686-w64-mingw32.shared-zlib
- mxe-i686-w64-mingw32.shared-pkgconf
- nasm
script:
- make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all

- env:
- MXE_CPU=x86_64
- PATH="/usr/lib/mxe/usr/bin/:$PATH"
addons:
apt:
sources:
- sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
packages:
- mxe-x86-64-w64-mingw32.shared-gcc
- mxe-x86-64-w64-mingw32.shared-sdl2
- mxe-x86-64-w64-mingw32.shared-freeglut
- mxe-x86-64-w64-mingw32.shared-freetype
- mxe-x86-64-w64-mingw32.shared-libpng
- mxe-x86-64-w64-mingw32.shared-zlib
- mxe-i686-w64-mingw32.shared-pkgconf
- nasm
script:
- make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all
#matrix:
# include:
# - env:
# - MXE_CPU=i686
# - PATH="/usr/lib/mxe/usr/bin/:$PATH"
# addons:
# apt:
# sources:
# - sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
# key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
# packages:
# - mxe-i686-w64-mingw32.shared-gcc
# - mxe-i686-w64-mingw32.shared-sdl2
# - mxe-i686-w64-mingw32.shared-freeglut
# - mxe-i686-w64-mingw32.shared-freetype
# - mxe-i686-w64-mingw32.shared-libpng
# - mxe-i686-w64-mingw32.shared-zlib
# - mxe-i686-w64-mingw32.shared-pkgconf
# - nasm
# script:
# - make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
# make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all
#
# - env:
# - MXE_CPU=x86_64
# - PATH="/usr/lib/mxe/usr/bin/:$PATH"
# addons:
# apt:
# sources:
# - sourceline: 'deb http://pkg.mxe.cc/repos/apt/debian jessie main'
# key_url: 'http://pkg.mxe.cc/repos/apt/conf/mxeapt.gpg'
# packages:
# - mxe-x86-64-w64-mingw32.shared-gcc
# - mxe-x86-64-w64-mingw32.shared-sdl2
# - mxe-x86-64-w64-mingw32.shared-freeglut
# - mxe-x86-64-w64-mingw32.shared-freetype
# - mxe-x86-64-w64-mingw32.shared-libpng
# - mxe-x86-64-w64-mingw32.shared-zlib
# - mxe-i686-w64-mingw32.shared-pkgconf
# - nasm
# script:
# - make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 clean &&
# make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" SDL_CONFIG="${MXE_CPU}-w64-mingw32.shared-sdl2-config" -C projects/unix V=1 -j$(nproc) all
31 changes: 21 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
version: 1.0.{build}

configuration:
- New_Dynarec_Release
- Release

platform:
- x86
- x64

matrix:
exclude:
- platform: x64
configuration: New_Dynarec_Release
install:
- cmd: set "ORIG_PATH=%PATH%"
# Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
- cmd: set "MESON_FIXED_NINJA=1"
- ps: (new-object net.webclient).DownloadFile('http://nirbheek.in/files/binaries/ninja/win32/ninja.exe', 'C:\projects\meson\ninja.exe')
# Use the x86 python only when building for x86 for the cpython tests.
# For all other archs (including, say, arm), use the x64 python.
- cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python34) else (set MESON_PYTHON_PATH=C:\python34-x64)
- cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %arch% )
- cmd: if %compiler%==msvc2013 ( call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %arch% )
- cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
- cmd: echo Using Python at %MESON_PYTHON_PATH%
- cmd: "%MESON_PYTHON_PATH%\\pip install meson"

build_script:
- cmd: echo Building on %arch% with %compiler%
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && python meson.py --backend=ninja builddir
- cmd: PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%; && ninja -C builddir

before_build:
- cmd: git clone --depth 1 https://github.com/mupen64plus/mupen64plus-win32-deps.git ../mupen64plus-win32-deps
build:
project: projects/VisualStudio2013/mupen64plus-core.vcxproj
verbosity: minimal
on_finish:
- cmd: set "PATH=%ORIG_PATH%"
Loading

0 comments on commit 66df9a7

Please sign in to comment.