﻿language: c

env:
  global:
    - LUA_CPATH="./?.so;;"
    - LUA_LIBDIR="/usr/lib/x86_64-linux-gnu/"
  matrix:
    - "LUA=lua5.1 LIBLUA=liblua5.1-dev     LUA_INCDIR=/usr/include/lua5.1     LUA_LIB=lua5.1"
    - "LUA=lua5.2 LIBLUA=liblua5.2-dev     LUA_INCDIR=/usr/include/lua5.2     LUA_LIB=lua5.2"
    - "LUA=luajit LIBLUA=libluajit-5.1-dev LUA_INCDIR=/usr/include/luajit-2.0 LUA_LIB=luajit-5.1"

branches:
  only:
    - master

compiler:
  #- "clang"
  - "gcc"

before_install:
  - 'if [ $LUA = "luajit" ]; then sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y; fi'

install:
  - "sudo apt-get install $LUA -y"
  - "sudo apt-get install $LIBLUA -y"

script:
  - "mkdir build; cd build"
  - "cmake .. -DLUA_LIBRARIES=$LUA_LIBDIR -DLUA_INCLUDE_DIR=$LUA_INCDIR"
  - "make "

notifications:
  email:
    on_failure: always
    on_success: change

﻿language: c

env:
  global:
    - LUA_CPATH="./?.so;;"
    - LUA_LIBDIR="/usr/lib/x86_64-linux-gnu/"
  matrix:
    - "LUA=lua5.1 LIBLUA=liblua5.1-dev     LUA_INCDIR=/usr/include/lua5.1     LUA_LIB=lua5.1"
    - "LUA=lua5.2 LIBLUA=liblua5.2-dev     LUA_INCDIR=/usr/include/lua5.2     LUA_LIB=lua5.2"
    - "LUA=luajit LIBLUA=libluajit-5.1-dev LUA_INCDIR=/usr/include/luajit-2.0 LUA_LIB=luajit-5.1"

branches:
  only:
    - master

compiler:
  #- "clang"
  - "gcc"

before_install:
  - 'if [ $LUA = "luajit" ]; then sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y; fi'

install:
  - "sudo apt-get install $LUA -y"
  - "sudo apt-get install $LIBLUA -y"
  - "LUA_LIBDIR=`pkg-config $LUA --variable=libdir`"

script:
  - "mkdir build; cd build"
  - "echo LUA_LIBDIR = $LUA_LIBDIR"
  - "cmake .. -DLUA_LIBRARIES=$LUA_LIBDIR -DLUA_INCLUDE_DIR=$LUA_INCDIR"
  - "make "

notifications:
  email:
    on_failure: always
    on_success: change

Test auto detection of LUA_LIBDIR.
Test auto detection of LUA_LIBDIR.
