Travis: Adding the SDL+GL3 project on the Travis build setup (for both Linux and OSX).

Examples: SDL+GL3: Makefile blind fix for OSX (untested) (#1229, #1209)
This commit is contained in:
omar 2017-07-15 13:13:09 +08:00
parent 0fe5728971
commit 358e667b7a
2 changed files with 5 additions and 8 deletions

View File

@ -9,10 +9,10 @@ compiler:
- clang - clang
before_install: before_install:
- if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository -y ppa:pyglfw/pyglfw && sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends libglfw3-dev libxrandr-dev libxi-dev libxxf86vm-dev; fi - if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository -y ppa:pyglfw/pyglfw && sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends libglfw3-dev libxrandr-dev libxi-dev libxxf86vm-dev libsdl2-dev; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install glfw3; fi - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install glfw3 && brew install sdl2; fi
script: script:
- make -C examples/opengl2_example - make -C examples/opengl2_example
- make -C examples/opengl3_example - make -C examples/opengl3_example
- make -C examples/sdl_opengl3_example

View File

@ -31,12 +31,9 @@ endif
ifeq ($(UNAME_S), Darwin) #APPLE ifeq ($(UNAME_S), Darwin) #APPLE
ECHO_MESSAGE = "Mac OS X" ECHO_MESSAGE = "Mac OS X"
LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -framework SDL2
# FIXME: Missing SDL2 libs/includes
#LIBS += -L/usr/local/lib -lglfw3
#LIBS += -L/usr/local/lib -lglfw
CXXFLAGS = -I../../ -I../libs/gl3w -I/usr/local/include CXXFLAGS = -I../../ -I../libs/gl3w -I/usr/local/include -I /Library/Frameworks/SDL2.framework/Headers
CXXFLAGS += -Wall -Wformat CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS) CFLAGS = $(CXXFLAGS)
endif endif