diff options
| author | Ahmad Fatoum <[email protected]> | 2018-02-03 10:17:51 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-02-03 10:17:51 +0100 |
| commit | 7f5fa4d49c4641a8dc0a6716b64cec9166f3fcdc (patch) | |
| tree | c5a82ecb5a412f0d5b1220ae4c859d9437b0e588 /.travis.yml | |
| parent | 007ae1b7b3446da7d2c561db69a535c5ac0b93da (diff) | |
| download | raylib-7f5fa4d49c4641a8dc0a6716b64cec9166f3fcdc.tar.gz raylib-7f5fa4d49c4641a8dc0a6716b64cec9166f3fcdc.zip | |
CMake: Add tristate option for using system GLFW (#455)
-DWITH_SYSTEM_GLFW=ON: Link against system glfw and fail otherwise
-DWITH_SYSTEM_GLFW=OFF: Use embedded rglfw.c
-DWITH_SYSTEM_GLFW=IF_POSSIBLE: Probe for system glfw but fallback to
rglfw if unavailable
Also change Linux 64-bit CI build to install system glfw and use it,
so this doesn't bitrot.
Addresses #453.
Diffstat (limited to '.travis.yml')
| -rw-r--r-- | .travis.yml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 0974b218..b22892eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: env: ARCH=i386 sudo: required - os: linux - env: ARCH=amd64 + env: ARCH=amd64 GLFW=SYSTEM sudo: required - os: osx env: ARCH=universal @@ -30,14 +30,22 @@ before_install: export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH"; if [ "$ARCH" == "i386" ]; then export CFLAGS="-m32"; fi; if [ "$ARCH" == "amd64" ]; then export CFLAGS="-m64"; fi; + if [ "$GLFW" == "SYSTEM" ]; then + wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3_3.2.1-1_amd64.deb'; + wget 'http://ftp.de.debian.org/debian/pool/main/g/glfw3/libglfw3-dev_3.2.1-1_amd64.deb'; + sudo dpkg -i libglfw3_3.2.1-1_amd64.deb libglfw3-dev_3.2.1-1_amd64.deb; + fi; + fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then + export RAYLIB_PACKAGE_SUFFIX="-macOS"; + if [ "$GLFW" == "SYSTEM" ]; then brew update; brew install glfw; fi; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export RAYLIB_PACKAGE_SUFFIX="-macOS"; fi - "$CC --version" script: - mkdir build - cd build - - cmake -DMACOS_FATLIB=ON -DSTATIC_RAYLIB=ON -DSHARED_RAYLIB=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON .. + - cmake -DMACOS_FATLIB=ON -DSTATIC_RAYLIB=ON -DSHARED_RAYLIB=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON -DWITH_SYSTEM_GLFW=IF_POSSIBLE .. - make VERBOSE=1 - make package |
