os:
  - linux
  - osx

addons:
  apt:
    sources:
      - kubuntu-backports
    packages:
      - cmake
      - libudev-dev
      - libusb-1.0-0-dev
      - autotools-dev
      - autoconf
      - automake
      - libtool
      - libftdi-dev

before_install:
  - wget https://github.com/signal11/hidapi/archive/master.zip -O /tmp/hidapi.zip
  - unzip /tmp/hidapi.zip -d /tmp
  - cd /tmp/hidapi-master
  - ./bootstrap
  - ./configure --prefix=`pwd`/_local_install
  - make
  - make install
  - export PKG_CONFIG_PATH="`pwd`/_local_install/lib/pkgconfig:$PKG_CONFIG_PATH"
  - cd -

language: c

script:
  - mkdir _build
  - cd _build
  - cmake ..
  - make

os:
  - linux
  - osx

compiler:
  - gcc
  - clang

addons:
  apt:
    sources:
      - kubuntu-backports
    packages:
      - cmake
      - libudev-dev
      - libusb-1.0-0-dev
      - autotools-dev
      - autoconf
      - automake
      - libtool
      - libftdi-dev

before_install:
  # OSX-specific packages
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libusb; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libftdi; fi
  # hidapi
  - wget https://github.com/signal11/hidapi/archive/master.zip -O /tmp/hidapi.zip
  - unzip /tmp/hidapi.zip -d /tmp
  - cd /tmp/hidapi-master
  - ./bootstrap
  - ./configure --prefix=`pwd`/_local_install
  - make
  - make install
  - export PKG_CONFIG_PATH="`pwd`/_local_install/lib/pkgconfig:$PKG_CONFIG_PATH"
  - cd -

language: c

script:
  - mkdir _build
  - cd _build
  - cmake ..
  - make

Test both gcc and clang; install libusb and libftdi in osx
Test both gcc and clang; install libusb and libftdi in osx
