Skip to content

Commit

Permalink
Add toluapp subtree (brndnmtthws#712)
Browse files Browse the repository at this point in the history
* First commit!

* Import to git

* Droping down CMake requirement

* Corrected installation of libraries

* Adding travis build

* Updated cmake macros

* Fixed find package

* Updated travis hook

* Updated travis hook

* Patch to support Lua 5.3.

* Fix Lua header include directives in tolua++.h

Use angle bracket rather than double quotes when including Lua headers in the tolua++ header. This fixes a problem on systems that default to a Lua version newer than 5.1 and install the tolua++ header to the same directory as newer Lua headers.

As there are (usually) no Lua headers in the same directory when building tolua++ itself, the preprocessor will look to the include directories passed to the compiler, one of which would be the Lua 5.1 include directory, and tolua++ will build with those (correct) headers. Then the tolua++ header is usually installed in the default include directory, alongside the newer Lua headers, which you wouldn't expect to cause any trouble.

But it does cause trouble when trying to build other programs that include the tolua++ header, because now the preprocessor does find Lua headers in the same directory as the tolua++ header, which are the newer (incorrect) headers. Now the program will either fail to compile, because it doesn't support the newer headers, or fail to link with the tolua++ shared object because they were compiled against different Lua headers.

Using angle brackets instead of double quotes in the include directives will fix the problem, because then the preprocessor will look to the include directories passed to the compiler first.

See http://www.cegui.org.uk/forum/viewtopic.php?f=10&t=7195

* Remove email notifications.

* Update travis build.

* Build shared and static libs.

* Patch toluapp to support Lua 5.3.

With this change, support for Lua 5.1 is dropped.

This resolve brndnmtthws#116.

* Add some comments to clarify the toluapp handling.

* Add minor sonar fix.
  • Loading branch information
brndnmtthws authored Dec 20, 2018
1 parent 3a30929 commit bb8723d
Show file tree
Hide file tree
Showing 131 changed files with 31,223 additions and 177 deletions.
103 changes: 43 additions & 60 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ matrix:
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
Expand All @@ -28,7 +27,6 @@ matrix:
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
Expand All @@ -37,7 +35,6 @@ matrix:
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
Expand All @@ -57,8 +54,7 @@ matrix:
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
Expand All @@ -68,7 +64,6 @@ matrix:
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
Expand All @@ -77,7 +72,6 @@ matrix:
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
Expand All @@ -97,8 +91,7 @@ matrix:
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
Expand All @@ -108,7 +101,6 @@ matrix:
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
Expand All @@ -117,7 +109,6 @@ matrix:
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
Expand All @@ -137,8 +128,7 @@ matrix:
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
Expand All @@ -148,7 +138,6 @@ matrix:
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
Expand All @@ -157,7 +146,6 @@ matrix:
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
Expand All @@ -177,8 +165,7 @@ matrix:
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
Expand All @@ -188,7 +175,6 @@ matrix:
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
Expand All @@ -197,7 +183,6 @@ matrix:
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
Expand All @@ -218,8 +203,7 @@ matrix:
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
Expand All @@ -229,7 +213,6 @@ matrix:
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
Expand All @@ -238,7 +221,6 @@ matrix:
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
sonarcloud:
organization: "brndnmtthws-github"
Expand All @@ -256,8 +238,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then eval "${MATRIX_EVAL}" ; fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install freetype gettext lua imlib2 ccache;
HOMEBREW_NO_AUTO_UPDATE=1 brew install freetype gettext lua imlib2 librsvg ccache;
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link gettext --force ; fi
Expand All @@ -266,58 +247,60 @@ before_script:
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mkdir build && cd build
cmake \
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_MYSQL=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_AUDACIOUS=ON \
-DBUILD_XMMS2=ON \
-DBUILD_ICAL=ON \
-DBUILD_IRC=ON \
-DBUILD_HTTP=ON \
-DBUILD_ICONV=ON \
-DBUILD_PULSEAUDIO=ON \
-DBUILD_JOURNAL=ON \
-DBUILD_RSS=ON \
-DBUILD_MYSQL=ON \
-DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_AUDACIOUS=ON \
-DBUILD_XMMS2=ON \
-DBUILD_ICAL=ON \
-DBUILD_IRC=ON \
-DBUILD_HTTP=ON \
-DBUILD_ICONV=ON \
-DBUILD_PULSEAUDIO=ON \
-DBUILD_JOURNAL=ON \
-DBUILD_RSS=ON \
..
cd ..
mkdir build-no-x11
cd build-no-x11
cmake \
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_X11=OFF \
-DBUILD_MYSQL=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_AUDACIOUS=ON \
-DBUILD_XMMS2=ON \
-DBUILD_ICAL=ON \
-DBUILD_IRC=ON \
-DBUILD_HTTP=ON \
-DBUILD_ICONV=ON \
-DBUILD_PULSEAUDIO=ON \
-DBUILD_JOURNAL=ON \
-DBUILD_RSS=ON \
-DBUILD_X11=OFF \
-DBUILD_MYSQL=ON \
-DBUILD_LUA_CAIRO=ON \
-DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=ON \
-DBUILD_AUDACIOUS=ON \
-DBUILD_XMMS2=ON \
-DBUILD_ICAL=ON \
-DBUILD_IRC=ON \
-DBUILD_HTTP=ON \
-DBUILD_ICONV=ON \
-DBUILD_PULSEAUDIO=ON \
-DBUILD_JOURNAL=ON \
-DBUILD_RSS=ON \
..
cd ..
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir build && cd build
cmake \
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_IMLIB2=ON \
..
cd ..
mkdir build-no-x11
cd build-no-x11
cmake \
-DBUILD_X11=OFF \
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_X11=OFF \
-DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_IMLIB2=ON \
..
cd ..
fi
Expand Down
100 changes: 100 additions & 0 deletions 3rdparty/toluapp/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
language: cpp
cache: ccache
dist: xenial
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- liblua5.3-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- liblua5.3-dev
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- liblua5.3-dev
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- liblua5.3-dev
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
- liblua5.3-dev
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-7
packages:
- clang-7
- liblua5.3-dev
env:
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
- os: osx
osx_image: xcode9.4
- os: osx
osx_image: xcode10
- os: osx
osx_image: xcode10.1

before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install lua ccache;
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi
- eval "${MATRIX_EVAL}"
# Combine global build options with OS/compiler-dependent options
- export CMAKE_OPTIONS="${CMAKE_OPTIONS} ${ENV_CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
- export CXX_FLAGS="${CXX_FLAGS} ${ENV_CXX_FLAGS}"

install:
- echo ${PATH}
- echo ${CXX}
- ${CXX} --version
- ${CXX} -v

script:
- mkdir -p build
- cd build
- cmake ${CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS=${CXX_FLAGS} ..
- make -j4

# Only watch the master branch
branches:
only:
- master
Loading

0 comments on commit bb8723d

Please sign in to comment.