Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake build script #6

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
20 changes: 20 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 1.2-{build}
image: Visual Studio 2017
configuration: Debug
platform:
- Win32
- x64
install:
- if %platform%==Win32 set VCPKG_TRIPLET=x86-windows
- if %platform%==x64 set VCPKG_TRIPLET=x64-windows
- vcpkg install libogg:%VCPKG_TRIPLET% fftw3:%VCPKG_TRIPLET%
before_build:
- mkdir CMakeBuild
- cd CMakeBuild
- if %platform%==Win32 set CMAKE_GENERATOR=Visual Studio 15 2017
- if %platform%==x64 set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
- cmake .. -G"%CMAKE_GENERATOR%" -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
build_script:
- cmake --build . --config %configuration%
cache:
C:\Tools\vcpkg\Installed -> appveyor.yml
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ src/speexdec
src/speexenc
stamp-*
patches

CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
34 changes: 26 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
language: c
sudo: false
dist: trusty
addons:
apt:
packages:
- libogg-dev
- libspeexdsp-dev
- libfftw3-dev

env:
- CONFIG=""
- CONFIG="--enable-fixed-point"
- CONFIG="--enable-fixed-point --disable-float-api"
- CONFIG="--enable-vorbis-psy"
- CONFIG="--disable-binaries"
matrix:
- CMAKE=1 CONFIG=""
- CMAKE=1 CONFIG="-DENABLE_FIXED_POINT:BOOL=TRUE -DENABLE_FLOATING_POINT:BOOL=FALSE"
- CMAKE=1 CONFIG="-DENABLE_FIXED_POINT:BOOL=TRUE -DENABLE_FLOATING_POINT:BOOL=FALSE -DDISABLE_FLOAT_API:BOOL=TRUE"
- CMAKE=1 CONFIG="-DENABLE_VORBIS_PSY:BOOL=TRUE"
- CMAKE=1 CONFIG="-DDISABLE_BINARIES:BOOL=TRUE"
- AUTOTOOLS=1 CONFIG=""
- AUTOTOOLS=1 CONFIG="--enable-fixed-point"
- AUTOTOOLS=1 CONFIG="--enable-fixed-point --disable-float-api"
- AUTOTOOLS=1 CONFIG="--enable-vorbis-psy"
- AUTOTOOLS=1 CONFIG="--disable-binaries"

os:
- linux
Expand All @@ -15,7 +29,11 @@ compiler:
- gcc
- clang

before_install:
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew install libogg speexdsp fftw;
fi

script:
- ./autogen.sh
- ./configure $CONFIG
- make distcheck
- if [ "$CMAKE" == "1" ]; then mkdir cmake-build; cd cmake-build; cmake .. $CONFIG -DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=$HOME/cmake-check; make install; fi
- if [ "$AUTOTOOLS" == "1" ]; then ./autogen.sh; ./configure $CONFIG; make distcheck; fi
Loading