Skip to content

Commit

Permalink
Setup travis osx (hydrogen-music#502)
Browse files Browse the repository at this point in the history
* Setup build on OS X

* Install Qt5 on OS X

* Install Qt5 on OS X / set path for CMake to find it

* Add deps on libarchive libsndfile jack liblo and cppunit

* libarchive needs to set PKG_CONFIG_PATH to be found

* Add paths for libarchive / Remove unwanted OSC

* ALSA is Linux only

* Use libtar instead of libarchive

* Use libtar by default on OS X

* Add lrdf / LADPSA to OS X

* LRDF does not drag LADPSA with brew

* Add PulseAudio

* Stick to doc to write the matrix

* Speedup and cleanup

* do not use default language

* libarchive is preferred over libtar
  • Loading branch information
jdekozak authored and mauser committed May 21, 2017
1 parent 8a94925 commit a447b30
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
34 changes: 26 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
dist:
- trusty
sudo:
- required
language: cpp

env:
global:
- MAKEFLAGS="-j 2"

matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx

addons:
apt:
packages:
Expand All @@ -14,11 +23,20 @@ addons:
- liblo-dev
- libpulse-dev
- libcppunit-dev

before_install:
- sudo apt-get update -qq
- sudo apt-get install ladspa-sdk -y
language:
- cpp
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install ladspa-sdk -y; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install qt5;
export CMAKE_PREFIX_PATH="$(brew --prefix qt5)";
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install libarchive;
export PKG_CONFIG_PATH="$(brew --prefix libarchive)/lib/pkgconfig";
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libsndfile jack pulseaudio cppunit; fi

script:
- mkdir build && cd build && cmake .. && make
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ SET(WANT_LIBTAR TRUE)
OPTION(WANT_DEBUG "Build with debug information" ON)
IF(APPLE)
OPTION(WANT_SHARED "Build the core library shared." OFF)
OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" OFF)
ELSE()
OPTION(WANT_SHARED "Build the core library shared." ON)
OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
ENDIF()

OPTION(WANT_LIBARCHIVE "Enable use of libarchive instead of libtar" ON)
Expand All @@ -60,7 +62,6 @@ ELSE()
OPTION(WANT_OSS "Include OSS (Open Sound System) support" OFF)
ENDIF()

OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
IF(MINGW)
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
OPTION(WANT_PORTAUDIO "Include PortAudio support" ON)
Expand Down
1 change: 1 addition & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/src/core/include # generated config.h
${LASH_INCLUDE_DIR}
${QT_INCLUDES}
${LIBARCHIVE_INCLUDE_DIR}
)

IF(APPLE)
Expand Down

0 comments on commit a447b30

Please sign in to comment.