Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
sudo: false
language: cpp

matrix:
include:
- os: linux
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libgl1-mesa-dev
- libglu1-mesa-dev
- mesa-common-dev
- libx11-dev
- libxcursor-dev
- libxrandr-dev
- libxi-dev
- uuid-dev
- gcc-7
- g++-7
- ninja-build
- os: osx
compiler:
- clang
osx_image: xcode9

install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/Deps"
- mkdir ${DEPS_DIR}

# Download libUUID
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install ossp-uuid ninja
fi

# Download CMake
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x86_64.tar.gz"
cd ${DEPS_DIR}
mkdir cmake
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
fi

# Download binutils 2.28
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
BINUTILS_URL="http://data.banshee3d.com/binutils-2.28-trusty.zip"
cd ${DEPS_DIR}
mkdir binutils
cd binutils
wget --no-check-certificate --quiet - ${BINUTILS_URL}
unzip -q binutils-2.28-trusty.zip
export PATH=${DEPS_DIR}/binutils/bin:${PATH}
export LD_LIBRARY_PATH=${DEPS_DIR}/binutils/lib:$LD_LIBRARY_PATH
fi

- cd ${TRAVIS_BUILD_DIR}
- git clone https://github.com/cwfitzgerald/bsf.git ../bsf -b cotire


script:
- INSTALL_DIR="${TRAVIS_BUILD_DIR}/Install"
- mkdir ${INSTALL_DIR}
- mkdir Build && cd Build
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cmake -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL_DIR} .. -GNinja
else
cmake -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL_DIR} .. -GNinja
fi
- ninja -j3
- ninja install
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ set (APP_ROOT_DIR ${BSF_DIRECTORY})
set (SECONDARY_APP_ROOT_DIR "${PROJECT_SOURCE_DIR}")
set (BS_IS_BANSHEE3D 0)

set(ENABLE_COTIRE false CACHE BOOL "Enable cotire's precompiled headers and unity build support (experimental)")

if(ENABLE_COTIRE)
include(cotire.cmake)
endif()

include(${BSF_SOURCE_DIR}/CMake/Properties.cmake)
include(${BSF_SOURCE_DIR}/CMake/FindPackageOrBuild.cmake)
include(${BSF_SOURCE_DIR}/CMake/HelperMethods.cmake)

enable_colored_output()

add_subdirectory(${BSF_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/bsf)

set(BS_EXAMPLES_BUILTIN_ASSETS_VERSION 7)
Expand All @@ -31,4 +39,4 @@ add_subdirectory(Source/GUI)
add_subdirectory(Source/Audio)
add_subdirectory(Source/SkeletalAnimation)
add_subdirectory(Source/Physics)
add_subdirectory_optional(Source/Experimental/Shadows)
add_subdirectory_optional(Source/Experimental/Shadows)
4 changes: 3 additions & 1 deletion Source/Audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(Audio)
add_dependencies(Audio bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET Audio PROPERTY FOLDER Examples)
set_property(TARGET Audio PROPERTY FOLDER Examples)

conditional_cotire(Audio)
2 changes: 2 additions & 0 deletions Source/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ set_property(TARGET Common PROPERTY FOLDER Examples)

# Copy bsf binaries
copyBsfBinaries(Common ${BSF_DIRECTORY})

conditional_cotire(Common)
4 changes: 3 additions & 1 deletion Source/CustomMaterials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(CustomMaterials)
add_dependencies(CustomMaterials bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET CustomMaterials PROPERTY FOLDER Examples)
set_property(TARGET CustomMaterials PROPERTY FOLDER Examples)

conditional_cotire(CustomMaterials)
4 changes: 3 additions & 1 deletion Source/GUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(GUI)
add_dependencies(GUI bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET GUI PROPERTY FOLDER Examples)
set_property(TARGET GUI PROPERTY FOLDER Examples)

conditional_cotire(GUI)
4 changes: 3 additions & 1 deletion Source/LowLevelRendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(LowLevelRendering)
add_dependencies(LowLevelRendering bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET LowLevelRendering PROPERTY FOLDER Examples)
set_property(TARGET LowLevelRendering PROPERTY FOLDER Examples)

conditional_cotire(LowLevelRendering)
4 changes: 3 additions & 1 deletion Source/PhysicallyBasedShading/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(PhysicallyBasedShading)
add_dependencies(PhysicallyBasedShading bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET PhysicallyBasedShading PROPERTY FOLDER Examples)
set_property(TARGET PhysicallyBasedShading PROPERTY FOLDER Examples)

conditional_cotire(PhysicallyBasedShading)
4 changes: 3 additions & 1 deletion Source/Physics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(Physics)
add_dependencies(Physics bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET Physics PROPERTY FOLDER Examples)
set_property(TARGET Physics PROPERTY FOLDER Examples)

conditional_cotire(Physics)
4 changes: 3 additions & 1 deletion Source/SkeletalAnimation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ add_engine_dependencies(SkeletalAnimation)
add_dependencies(SkeletalAnimation bsfFBXImporter bsfFontImporter bsfFreeImgImporter)

# IDE specific
set_property(TARGET SkeletalAnimation PROPERTY FOLDER Examples)
set_property(TARGET SkeletalAnimation PROPERTY FOLDER Examples)

conditional_cotire(SkeletalAnimation)
Loading