Skip to content

Commit

Permalink
Fix OSX compile and deploy
Browse files Browse the repository at this point in the history
Set additional compile flag
Fix DMG creation (sometimes fails if no volume size is provided)

Closes GH-304.

(cherry picked from commit 8a7444f)

Conflicts:
    .travis.yml
    cmake/FindLdap.cmake
  • Loading branch information
romibi authored and Sput42 committed Feb 28, 2018
1 parent 4ef2d74 commit f736bdd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
os:
- linux
- osx

sudo: required
dist: trusty
Expand All @@ -17,13 +16,13 @@ env:
- QT_VERSION=qt5

matrix:
include:
- os: osx
compiler: gcc
env: QT_VERSION=qt5
exclude:
- compiler: clang
env: QT_VERSION=qt4
- os: osx
compiler: clang
- os: osx
env: QT_VERSION=qt4

install: |-
if [ "$TRAVIS_OS_NAME" == "linux" ]
Expand All @@ -50,12 +49,12 @@ script: |-
make
elif [ "$TRAVIS_OS_NAME" == "osx" ]
then
PATH=$PATH:/usr/local/opt/qt5/bin
if [[ "$TRAVIS_TAG" != "" && "$GH_TOKEN" != "" ]]
then
PATH=$PATH:/usr/local/opt/qt5/bin
cmake -G"Ninja" .. -DCMAKE_BUILD_TYPE=Release -DUSE_QT5=ON -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DDEPLOY=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5
cmake -G"Ninja" .. -DCMAKE_BUILD_TYPE=Release -DUSE_QT5=ON -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DDEPLOY=ON
else
cmake -G"Ninja" .. -DCMAKE_BUILD_TYPE=Release -DUSE_QT5=ON -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5
cmake -G"Ninja" .. -DCMAKE_BUILD_TYPE=Release -DUSE_QT5=ON -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON
fi
ninja install
fi
Expand Down
3 changes: 1 addition & 2 deletions cmake/QuasselCompileSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,5 @@ endif()
# Mac build stuff
if (APPLE AND DEPLOY)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9")
set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9 -stdlib=libc++")
endif()
3 changes: 2 additions & 1 deletion scripts/build/macosx_makePackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ case $BUILDTYPE in
exit 1
;;
esac
hdiutil create -srcfolder ${PACKAGETMPDIR} -format UDBZ -volname "Quassel ${BUILDTYPE} - ${QUASSEL_VERSION}" "${WORKINGDIR}${QUASSEL_DMG}" >/dev/null
PACKAGESIZE=$(echo "$(du -ms ${PACKAGETMPDIR} | cut -f1) * 1.1" | bc)
hdiutil create -srcfolder ${PACKAGETMPDIR} -format UDBZ -size ${PACKAGESIZE}M -volname "Quassel ${BUILDTYPE} - ${QUASSEL_VERSION}" "${WORKINGDIR}${QUASSEL_DMG}" >/dev/null
rm -rf ${PACKAGETMPDIR}

0 comments on commit f736bdd

Please sign in to comment.