Skip to content

Commit

Permalink
Update travis yaml-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper committed Mar 1, 2018
1 parent c429062 commit 84a9c8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,22 @@ addons:
- libsdl1.2-dev
- libsdl-mixer1.2-dev
- libsdl-image1.2-dev
- libsdl-gfx1.2-dev
- libyaml-cpp-dev
- libsdl-gfx1.2-dev

env:
- BUILD_TYPE=Debug EXTRA_WARNING_FLAGS="-Wall -Wextra"
- BUILD_TYPE=Release EXTRA_WARNING_FLAGS="-Wall -Wextra"

before_install:
- if [ $TRAVIS_OS_NAME == osx ]; then brew install yaml-cpp sdl sdl_gfx sdl_image sdl_mixer --with-flac --with-libmikmod --with-libvorbis --with-static-lib; fi
- if [ $TRAVIS_OS_NAME == linux ]; then mkdir $TRAVIS_BUILD_DIR/dependency-prefix; fi
- if [ $TRAVIS_OS_NAME == linux ]; then export PKG_CONFIG_PATH=$TRAVIS_BUILD_DIR/dependency-prefix/lib/pkgconfig; fi

install:
- if [ $TRAVIS_OS_NAME == linux ]; then mkdir -p $TRAVIS_BUILD_DIR/dependencies/; fi
- if [ $TRAVIS_OS_NAME == linux ]; then pushd $TRAVIS_BUILD_DIR/dependencies/ && git clone https://github.com/jbeder/yaml-cpp.git && pushd yaml-cpp && git checkout release-0.6.1 && cmake -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/dependency-prefix -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DYAML_CPP_BUILD_CONTRIB=NO -DYAML_CPP_BUILD_TOOLS=NO . && make -j2 && make install && popd && popd; fi

before_script:
- cmake . -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DCMAKE_CXX_FLAGS="${EXTRA_WARNING_FLAGS}" -DCMAKE_C_FLAGS="${EXTRA_WARNING_FLAGS}"
- cmake . -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DYAMLCPP_INCLUDE_DIR=$TRAVIS_BUILD_DIR/dependency-prefix/include -DCMAKE_CXX_FLAGS="${EXTRA_WARNING_FLAGS}" -DCMAKE_C_FLAGS="${EXTRA_WARNING_FLAGS}"

script: make -j2
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
project ( OpenXcom )

cmake_minimum_required ( VERSION 2.8.5 )
cmake_minimum_required ( VERSION 3.1 )
set ( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include(GNUInstallDirs)

# For yaml-cpp
set (CMAKE_CXX_STANDARD 11)

option ( DEV_BUILD "Development Build. Disable this for release builds" ON )
option ( BUILD_PACKAGE "Prepares build for creation of a package with CPack" ON )
option ( ENABLE_WARNING "Always show warnings (even for release builds)" OFF )
Expand Down

0 comments on commit 84a9c8d

Please sign in to comment.