Merge pull request #90 from debauchee/master
merge travis CI patches (and others)
This commit is contained in:
commit
6761528e0b
40
.travis.yml
40
.travis.yml
|
@ -1,10 +1,34 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
before_install:
|
|
||||||
- sudo apt-get update -qq
|
matrix:
|
||||||
- sudo apt-get install -qq libxtst-dev
|
include:
|
||||||
- sudo apt-get install -qq qtdeclarative5-dev
|
- os: linux
|
||||||
- sudo apt-get install -qq libavahi-compat-libdnssd-dev
|
sudo: false
|
||||||
script: sh -x ./clean_build.sh
|
dist: trusty
|
||||||
# skip install phase since we have a customized install package
|
addons:
|
||||||
# creation tool for each supported platform
|
apt:
|
||||||
|
packages:
|
||||||
|
- libxtst-dev
|
||||||
|
- qtdeclarative5-dev
|
||||||
|
- libavahi-compat-libdnssd-dev
|
||||||
|
script: sh -x ./clean_build.sh
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9
|
||||||
|
script:
|
||||||
|
- export COLUMNS=80
|
||||||
|
- curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
|
||||||
|
- chmod +x ./macports-ci
|
||||||
|
- ./macports-ci install
|
||||||
|
- PATH="$PATH:/opt/local/bin"
|
||||||
|
- sudo port -N install qt5-qtbase openssl
|
||||||
|
- sh -x ./clean_build.sh
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9
|
||||||
|
script:
|
||||||
|
- brew update
|
||||||
|
- brew install qt openssl
|
||||||
|
- sh -x ./clean_build.sh
|
||||||
|
|
||||||
install: true
|
install: true
|
||||||
|
|
|
@ -63,6 +63,7 @@ if (UNIX)
|
||||||
include (CheckIncludeFileCXX)
|
include (CheckIncludeFileCXX)
|
||||||
include (CheckSymbolExists)
|
include (CheckSymbolExists)
|
||||||
include (CheckCSourceCompiles)
|
include (CheckCSourceCompiles)
|
||||||
|
include (FindPkgConfig)
|
||||||
|
|
||||||
check_include_file_cxx (istream HAVE_ISTREAM)
|
check_include_file_cxx (istream HAVE_ISTREAM)
|
||||||
check_include_file_cxx (ostream HAVE_OSTREAM)
|
check_include_file_cxx (ostream HAVE_OSTREAM)
|
||||||
|
@ -163,6 +164,12 @@ if (UNIX)
|
||||||
link_directories("/usr/local/lib")
|
link_directories("/usr/local/lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (${PKG_CONFIG_FOUND})
|
||||||
|
pkg_check_modules (AVAHI_COMPAT REQUIRED avahi-compat-libdns_sd)
|
||||||
|
include_directories (BEFORE SYSTEM ${AVAHI_COMPAT_INCLUDE_DIRS})
|
||||||
|
set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${AVAHI_COMPAT_INCLUDE_DIRS}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
set (XKBlib "X11/Xlib.h;X11/XKBlib.h")
|
set (XKBlib "X11/Xlib.h;X11/XKBlib.h")
|
||||||
set (CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h")
|
set (CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h")
|
||||||
check_type_size ("XRRNotifyEvent" X11_EXTENSIONS_XRANDR_H)
|
check_type_size ("XRRNotifyEvent" X11_EXTENSIONS_XRANDR_H)
|
||||||
|
@ -302,13 +309,28 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||||
${OPENSSL_ROOT}/lib/ssleay32.lib
|
${OPENSSL_ROOT}/lib/ssleay32.lib
|
||||||
)
|
)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
|
||||||
|
if (IS_DIRECTORY /opt/local)
|
||||||
|
# macports
|
||||||
|
set (OPENSSL_ROOT /opt/local)
|
||||||
|
|
||||||
|
set (OPENSSL_LIBS
|
||||||
|
${OPENSSL_ROOT}/lib/libssl.a
|
||||||
|
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||||
|
z
|
||||||
|
)
|
||||||
|
elseif (IS_DIRECTORY /usr/local/opt/openssl)
|
||||||
|
# brew
|
||||||
set (OPENSSL_ROOT /usr/local/opt/openssl)
|
set (OPENSSL_ROOT /usr/local/opt/openssl)
|
||||||
|
|
||||||
include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
include_directories (BEFORE SYSTEM ${OPENSSL_ROOT}/include)
|
||||||
|
|
||||||
set (OPENSSL_LIBS
|
set (OPENSSL_LIBS
|
||||||
${OPENSSL_ROOT}/lib/libssl.a
|
${OPENSSL_ROOT}/lib/libssl.a
|
||||||
${OPENSSL_ROOT}/lib/libcrypto.a
|
${OPENSSL_ROOT}/lib/libcrypto.a
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set (OPENSSL_LIBS ssl crypto)
|
set (OPENSSL_LIBS ssl crypto)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -14,7 +14,7 @@ if [ "$(uname)" = "Darwin" ]; then
|
||||||
# OSX needs a lot of extra help, poor thing
|
# OSX needs a lot of extra help, poor thing
|
||||||
# run the osx_environment.sh script to fix paths
|
# run the osx_environment.sh script to fix paths
|
||||||
. ./osx_environment.sh
|
. ./osx_environment.sh
|
||||||
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
||||||
fi
|
fi
|
||||||
# allow local customizations to build environment
|
# allow local customizations to build environment
|
||||||
[ -r ./build_env.sh ] && . ./build_env.sh
|
[ -r ./build_env.sh ] && . ./build_env.sh
|
||||||
|
|
|
@ -1,16 +1,37 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
if [ ! $BARRIER_BUILD_ENV ]; then
|
if [ ! $BARRIER_BUILD_ENV ]; then
|
||||||
|
|
||||||
printf "Modifying environment for Barrier build..."
|
printf "Modifying environment for Barrier build..."
|
||||||
|
|
||||||
|
if command -v port; then
|
||||||
|
printf "Detected Macports"
|
||||||
|
|
||||||
|
if [ ! -d /opt/local/lib/cmake/Qt5 ]; then
|
||||||
|
printf "Please install qt5-qtbase port"
|
||||||
|
fi
|
||||||
|
export BARRIER_BUILD_MACPORTS=1
|
||||||
|
export CMAKE_PREFIX_PATH="/opt/local/lib/cmake/Qt5:$CMAKE_PREFIX_PATH"
|
||||||
|
export LD_LIBRARY_PATH="/opt/local/lib:$LD_LIBRARY_PATH"
|
||||||
|
export CPATH="/opt/local/include:$CPATH"
|
||||||
|
export PKG_CONFIG_PATH="/opt/local/libexec/qt5/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
|
||||||
|
elif command -v brew; then
|
||||||
|
printf "Detected Homebrew"
|
||||||
QT_PATH=$(brew --prefix qt)
|
QT_PATH=$(brew --prefix qt)
|
||||||
OPENSSL_PATH=$(brew --prefix openssl)
|
OPENSSL_PATH=$(brew --prefix openssl)
|
||||||
|
|
||||||
|
export BARRIER_BUILD_BREW=1
|
||||||
export CMAKE_PREFIX_PATH="$QT_PATH:$CMAKE_PREFIX_PATH"
|
export CMAKE_PREFIX_PATH="$QT_PATH:$CMAKE_PREFIX_PATH"
|
||||||
export LD_LIBRARY_PATH="$OPENSSL_PATH/lib:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$OPENSSL_PATH/lib:$LD_LIBRARY_PATH"
|
||||||
export CPATH="$OPENSSL_PATH/include:$CPATH"
|
export CPATH="$OPENSSL_PATH/include:$CPATH"
|
||||||
export PKG_CONFIG_PATH="$OPENSSL_PATH/lib/pkgconfig:$PKG_CONFIG_PATH"
|
export PKG_CONFIG_PATH="$OPENSSL_PATH/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
|
||||||
|
else
|
||||||
|
printf "Neither Homebrew nor Macports is installed. Can't get dependency paths"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
export BARRIER_BUILD_ENV=1
|
export BARRIER_BUILD_ENV=1
|
||||||
|
|
||||||
printf "done\n"
|
printf "done\n"
|
||||||
|
|
Loading…
Reference in New Issue