summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2017-11-24 19:57:44 +0100
committerAhmad Fatoum <[email protected]>2017-11-24 21:24:35 +0100
commit49c5a433df48c1b9efafb70e51724c2fc3a5e608 (patch)
tree3e26eb26e84f5ba638c5a97aa8d3c45cfb932027
parent10dc276423b32d00ee7f1e28fe19d66311bc49f6 (diff)
downloadraylib-49c5a433df48c1b9efafb70e51724c2fc3a5e608.tar.gz
raylib-49c5a433df48c1b9efafb70e51724c2fc3a5e608.zip
Setup CMake package target and CI auto-deploy tags
cmake --build . --target package # or make package if make is used can now be used to create binary packages for raylib. AppVeyor and Travis CI are configured to push the artifacts that result from building git tags to the related Github releases page.
-rw-r--r--.travis.yml52
-rw-r--r--README.md10
-rw-r--r--appveyor.yml58
-rw-r--r--raylib.pc.in2
-rw-r--r--src/CMakeLists.txt16
5 files changed, 82 insertions, 56 deletions
diff --git a/.travis.yml b/.travis.yml
index ce4998c7..40817fba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,38 +12,48 @@ os:
env:
global:
- VERBOSE=1
- matrix:
- - CFLAGS=-m64 SHARED=ON
- - CFLAGS=-m32 SHARED=OFF
-# We don't install x11 32-bit libraries, so skip shared libraries on -m32
+ matrix: # We don't install x11 32-bit libraries, so skip shared libraries on -m32
+ - ARCH=i386 SHARED=OFF
+ - ARCH=amd64 SHARED=ON
+
+matrix:
+ exclude: # This is already covered by building universal (fat) libraries by default
+ - os: osx
+ env: ARCH=i386 SHARED=OFF
+
before_script:
- - export CFLAGS="-std=gnu99 $CFLAGS"
+ - export CFLAGS="-std=gnu99"
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install -y gcc-multilib
libopenal-dev
libxcursor-dev libxinerama-dev
- mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev;
+ mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev
+ libgl1-mesa-dev libglu1-mesa-dev libglew-dev;
+ export RAYLIB_PACKAGE_SUFFIX="-Linux-$ARCH";
+ if [ "$ARCH" == "i386" ]; then export CFLAGS="$CFLAGS -m32"; fi;
+ if [ "$ARCH" == "amd64" ]; then export CFLAGS="$CFLAGS -m64"; fi;
fi
- - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew install glfw; fi
+ - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export RAYLIB_PACKAGE_SUFFIX="-macOS"; fi
- "$CC --version"
script:
- mkdir build
- cd build
- - cmake -DSTATIC_RAYLIB=ON -DSHARED_RAYLIB=$SHARED -DBUILD_EXAMPLES=OFF -DBUILD_GAMES=OFF ..
+ - cmake -DMACOS_FATLIB=ON -DSTATIC_RAYLIB=ON -DSHARED_RAYLIB=$SHARED -DBUILD_EXAMPLES=OFF -DBUILD_GAMES=OFF ..
- make
-# - make package
-# - sudo make install
-#
-#deploy:
-# provider: releases
-# api_key:
-# secure: XXX
-# file_glob: true
-# file: raylib-*.tar.gz
-# skip_cleanup: true
-# on:
-# branch: master
-# tags: true
+ - make package
+
+deploy:
+ provider: releases
+ api_key:
+ secure: LvqUIAN/3dJul+Ra2iK3tSaNG5IwsNMmGIwVMy0DK5IBCxiQPBc9pWGiE30RTBPt6Z+N4BhMEE8DtUl+vnISlMoHWNIIhF2zwC66hs/F7zY7qEITMRSmfiLcqxQysknFOnJB06CATgXcFqlEo9j+t4abrG/f3qcb92J4O2uNz336Au2myTx93Q5MxbyA7KiUuEutFnb2dWiPCY4d+sGeXEfsiD2R7aj/8MaWOkoGdZVrTkI9juMgvpImkjQBArvqdjUMeT3MsRrwgOIq5v2GFV9dOl8k1WzPeT8B2JHh00ed/o1/wuFq/cLLOxtYo2+Pv3+xatOrlexoX0WkDm7C9/L1W5U4rLexU3CQ9mMBmHPnp6k/WXZ5QXEE4uUF0+LpN3XlIXzFpdZmZiVV8VLxg2WvyncMmivYiu7/MTkyfZxyKkzwl7sZZslzHA9kOGedGaN7b7/2B77OFHoQK8lKfdFml7jJnarh+89nenNZYMab0E8qkOJOyb2bYlDTa0/2nyxGiyymYgq6YHLNrDbhqB/1LzdgzjMliQ8ri5q9Ux2vjfcqOzhfAmcwFwnY/D6yXJWYi0DWpHZdpKl3du6dYDrypW91/yDWbwiJ/YhrE7ZunzrcB6GH/QkbuzWxdCth39rQAHih8DG01co/K3Gvi4yGjvIH5tFUpyEolMnpMiA=
+ file_glob: true
+ file: raylib-*.tar.gz
+ skip_cleanup: true
+ on:
+ repo: raysan5/raylib
+ branch:
+ - develop
+ - master
diff --git a/README.md b/README.md
index 0be62fda..1c078f52 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ features
* Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD)
* Multiple platforms support: Windows, Linux, Mac, **Android**, **Raspberry Pi** and **HTML5**
* VR stereo rendering support with configurable HMD device parameters
- * Minimal external dependencies (GLFW3, OpenGL, OpenAL)
+ * Minimal external dependencies (OpenGL, OpenAL)
* Complete bindings to LUA ([raylib-lua](https://github.com/raysan5/raylib-lua)) and Go ([raylib-go](https://github.com/gen2brain/raylib-go))
raylib uses on its core module the outstanding [GLFW3](http://www.glfw.org/) library. The best option I found for
@@ -44,10 +44,12 @@ to accomodate to Android, Raspberry Pi and HTML5.
*On Raspberry Pi, Videocore API and EGL libraries are used for window/context management and raw inputs reading.*
-building
---------
+build and installation
+----------------------
+
+Binary releases for Windows, Linux and macOS are available at the [Github Releases](https://github.com/raysan5/raylib/releases) page.
-For detailed building instructions, check [raylib Wiki](https://github.com/raysan5/raylib/wiki).
+To build raylib yourself, check out the [raylib Wiki](https://github.com/raysan5/raylib/wiki) for detailed instructions.
raylib has been developed using exclusively two tools:
diff --git a/appveyor.yml b/appveyor.yml
index 864d0c68..2363bd3f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,29 +10,30 @@ init:
- cmake -E remove c:\programdata\chocolatey\bin\cpack.exe
- set PATH=%PATH:C:\Program Files (x86)\Git\usr\bin;=%
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- - set PATH=%prefix_dir%\bin;%PATH%
+ - if [%BITS%]==[32] set MINGW=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32
+ - if [%BITS%]==[64] set MINGW=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
+ - if [%COMPILER%]==[mingw] set PATH=%MINGW%\bin;%PATH%
+ - set RAYLIB_PACKAGE_SUFFIX=-Win%BITS%-%COMPILER%
+ - set VERBOSE=1
environment:
matrix:
- - compiler: MinGW-w64
+ - compiler: mingw
bits: 32
- prefix_dir: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32
- - compiler: MinGW-w64
+ - compiler: mingw
bits: 64
- prefix_dir: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
- - compiler: MSVC15
+ - compiler: msvc15
bits: 32
- - compiler: MSVC15
+ - compiler: msvc15
bits: 64
before_build:
- appveyor DownloadFile http://openal-soft.org/openal-binaries/openal-soft-1.17.2-bin.zip
- 7z x openal-soft-1.17.2-bin.zip
- move openal-soft-1.17.2-bin src\external\openal
- - if [%COMPILER%]==[MinGW-w64] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles"
- - if [%COMPILER%]==[MSVC15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015"
- - if [%COMPILER%]==[MSVC15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64"
- - set VERBOSE=1
+ - if [%compiler%]==[mingw] set CFLAGS=-m%BITS% & set LDFLAGS=-m%BITS% & set GENERATOR="MinGW Makefiles"
+ - if [%COMPILER%]==[msvc15] if [%BITS%]==[32] set GENERATOR="Visual Studio 14 2015"
+ - if [%COMPILER%]==[msvc15] if [%BITS%]==[64] set GENERATOR="Visual Studio 14 2015 Win64"
- mkdir build
- cd build
@@ -41,25 +42,26 @@ build_script:
- cmake --build . --target install
after_build:
-# - cmake --build . --target package
+ - cmake --build . --target package
before_test:
test_script:
-#artifacts:
-# - path: 'build\*.zip'
-#
-#deploy:
-# description: 'Automatic build by CI'
-# provider: GitHub
-# auth_token:
-# secure: XXX
-# artifact: /.*\.zip/
-# draft: false
-# prerelease: false
-# force_update: true
-# on:
-# branch: master
-# appveyor_repo_tag: true # deploy on tag push only
-#
+artifacts:
+ - path: 'build\*.zip'
+
+deploy:
+ description: 'Automatic build by CI'
+ provider: GitHub
+ auth_token:
+ secure: lqkfPGZPK828Mmopbicrng08QaaQXAshp0a9E3bMXt8+hpA8vCfDAT3jgU8kaSsW
+ artifact: /.*\.zip/
+ draft: false
+ prerelease: false
+ force_update: true
+ on:
+ branch:
+ - master
+ - develop
+ appveyor_repo_tag: true # deploy on tag push only
diff --git a/raylib.pc.in b/raylib.pc.in
index 0472c283..93984363 100644
--- a/raylib.pc.in
+++ b/raylib.pc.in
@@ -5,7 +5,7 @@ includedir=${prefix}/include
Name: raylib
Description: Simple and easy-to-use library to learn videogames programming
-URL: https://github.com/raysan5/raylib
+URL: http://github.com/raysan5/raylib
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lraylib
Libs.private:@PKG_CONFIG_LIBS_PRIVATE@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b29c29fc..1fec104f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,8 +2,7 @@
project(raylib)
include("../utils.cmake")
-set(raylib_VERSION_MAJOR 1)
-set(raylib_VERSION_MINOR 8)
+set(PROJECT_VERSION 1.9.0dev)
set(RAYLIB raylib) # Name of the generated library
@@ -173,3 +172,16 @@ message(STATUS "Compiling with the flags:")
message(STATUS " PLATFORM=" ${PLATFORM})
message(STATUS " GRAPHICS=" ${GRAPHICS})
+# Packaging
+SET(CPACK_PACKAGE_NAME "raylib")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simple and easy-to-use library to learn videogames programming")
+SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
+SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/../README.md")
+SET(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/../README.md")
+SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/../LICENSE.md")
+SET(CPACK_PACKAGE_FILE_NAME "raylib-${PROJECT_VERSION}$ENV{RAYLIB_PACKAGE_SUFFIX}")
+SET(CPACK_GENERATOR "ZIP;TGZ") # Remove this, if you want the NSIS installer on Windows
+include(CPack)