diff --git a/.travis.yml b/.travis.yml index e314d8e7b..839dbccd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ os: - linux -# - osx + - osx +osx_image: xcode7.2 language: cpp sudo: required dist: trusty diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index 8bfe2b70f..b9da52193 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -1,9 +1,10 @@ #!/bin/sh -export CXX=clang++ -export CC=clang - -brew tap openmw/openmw brew update -brew unlink boost -brew install openmw-mygui openmw-bullet openmw-sdl2 openmw-ffmpeg openmw/openmw/qt unshield +brew rm cmake || true +brew rm pkgconfig || true +brew rm qt5 || true +brew install cmake pkgconfig qt5 + +curl http://downloads.openmw.org/osx/dependencies/openmw-deps-263d4a8.zip -o ~/openmw-deps.zip +unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null diff --git a/CI/before_script.osx.sh b/CI/before_script.osx.sh index 772284f91..bf38186f6 100755 --- a/CI/before_script.osx.sh +++ b/CI/before_script.osx.sh @@ -1,5 +1,25 @@ #!/bin/sh +export CXX=clang++ +export CC=clang + +DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps" +QT_PATH="/usr/local/opt/qt5" + mkdir build cd build -cmake -DCMAKE_FRAMEWORK_PATH="/usr/local/lib/macosx/Release" -DCMAKE_EXE_LINKER_FLAGS="-F/usr/local/lib/macosx/Release" -DCMAKE_CXX_FLAGS="-stdlib=libstdc++" -DCMAKE_BUILD_TYPE=Debug -DBUILD_MYGUI_PLUGIN=OFF -G"Unix Makefiles" .. + +cmake \ +-D PKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON \ +-D CMAKE_EXE_LINKER_FLAGS="-lz" \ +-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \ +-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \ +-D CMAKE_OSX_SYSROOT="macosx10.11" \ +-D CMAKE_BUILD_TYPE=Debug \ +-D OPENMW_OSX_DEPLOYMENT=TRUE \ +-D DESIRED_QT_VERSION=5 \ +-D OSG_PLUGIN_LIB_SEARCH_PATH="$DEPENDENCIES_ROOT/lib/osgPlugins-3.4.0" \ +-D BUILD_ESMTOOL=FALSE \ +-D BUILD_MYGUI_PLUGIN=FALSE \ +-G"Unix Makefiles" \ +..