Add macOS to travis builds, fix server-only builds on macOS, msc. fixes (#3339)
* Use thread number from Travis docs
The other number is probably incorrect.
See https://github.com/travis-ci/travis-ci/issues/4696
* Add macOS to travis builds
* Remove unnecessary libraries
Not sure why these were added in the first place.
First commit that added them: 6aecb42e42
* Fix server-only build on macOS
This commit is contained in:
parent
872f214c41
commit
c4f0a71ef0
21
.travis.yml
21
.travis.yml
@ -5,6 +5,9 @@
|
||||
#
|
||||
sudo: false
|
||||
language: cpp
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
@ -40,21 +43,17 @@ addons:
|
||||
- zlib1g-dev
|
||||
|
||||
before_script:
|
||||
# Unfortunately using all threads crashes g++: "g++: internal compiler error: Killed (program cc1plus)"
|
||||
# Use half of the available threads, gcc is memory hungry
|
||||
- 'if [ ${CC} = "gcc" ]; then
|
||||
export THREADS=$((`nproc` / 2));
|
||||
else
|
||||
export THREADS=$((`nproc` + 1));
|
||||
fi'
|
||||
- echo "THREADS = $THREADS"
|
||||
- free -mt
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew bundle; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo mkdir -p /usr/local/include/; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CMAKE_PREFIX_PATH=/usr/local/opt/freetype/:/usr/local/opt/curl/:/usr/local/opt/libogg/:/usr/local/opt/libogg/:/usr/local/opt/libvorbis/:/usr/local/opt/openssl\@1.1/:/usr/local/opt/glew/:/usr/local/opt/fribidi/; fi
|
||||
|
||||
script:
|
||||
- mkdir "build"
|
||||
- cd "build"
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off
|
||||
- make VERBOSE=1 -j $THREADS
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then /usr/local/opt/cmake/bin/cmake .. -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2/ -DUSE_SYSTEM_GLEW=1 -DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/ -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib -DFREETYPE_LIBRARY=/usr/local/opt/freetype/lib/libfreetype.dylib -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSERVER_ONLY=$SERVER_ONLY -DCHECK_ASSETS=off -DBUILD_RECORDER=off; fi
|
||||
- make VERBOSE=1 -j3
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
|
8
Brewfile
Normal file
8
Brewfile
Normal file
@ -0,0 +1,8 @@
|
||||
brew "libogg"
|
||||
brew "libvorbis"
|
||||
brew "openal-soft"
|
||||
brew "freetype"
|
||||
brew "curl"
|
||||
brew "openssl@1.1"
|
||||
brew "fribidi"
|
||||
brew "glew"
|
@ -125,7 +125,7 @@ endif()
|
||||
|
||||
if(SERVER_ONLY)
|
||||
add_definitions(-DSERVER_ONLY)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_X11_ -DNO_IRR_COMPILE_WITH_OPENGL_ -DNO_IRR_COMPILE_WITH_OSX_DEVICE_)
|
||||
endif()
|
||||
|
||||
#if(DISABLE_VPX)
|
||||
@ -405,16 +405,10 @@ if(APPLE)
|
||||
add_executable(supertuxkart MACOSX_BUNDLE ${STK_SOURCES})
|
||||
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(QUICKTIME_LIBRARY QuickTime)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
find_library(AUDIOUNIT_LIBRARY AudioUnit)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
|
||||
target_link_libraries(supertuxkart
|
||||
${IOKIT_LIBRARY}
|
||||
${QUICKTIME_LIBRARY}
|
||||
${CARBON_LIBRARY}
|
||||
${AUDIOUNIT_LIBRARY}
|
||||
${COCOA_LIBRARY})
|
||||
|
||||
# configure CMake to use a custom Info.plist
|
||||
|
@ -91,6 +91,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Disable macOS/OSX device
|
||||
#ifdef NO_IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
#undef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
#define _IRR_ANDROID_PLATFORM_
|
||||
#define _IRR_POSIX_API_
|
||||
|
Loading…
Reference in New Issue
Block a user