qmake: better QMAKE_MACOSX_DEPLOYMENT_TARGET fix

Closes: #232, #310

Squashed commit of the following:

commit 042a6556de67f46c57ad1d6456b5328ac29ab933
Author: Oleksii Vilchanskyi <[email protected]>
Date:   Sat Dec 9 12:56:39 2017 +0100

    Adopt #310

commit 694fc3e835c5afe8d63803ca31a1495956470d94
Merge: d6782ff ab81204
Author: Oleksii Vilchanskyi <[email protected]>
Date:   Sat Dec 9 12:42:33 2017 +0100

    Merge branch 'master' of git://github.com/sterpe/ckb-next into sterpe-master

commit ab812045fa64e213525890498b5afad69619980a
Author: Steven R Terpe <[email protected]>
Date:   Mon Oct 9 18:37:38 2017 -0700

    Remove macOS/Qt workaround from quickinstall

commit 6e09c7c263f3fa59520ef8a833ec0850381b2ca0
Author: Steven R Terpe <[email protected]>
Date:   Sun Oct 8 20:20:59 2017 -0700

    Fix #232 for Qt 5.9.x
This commit is contained in:
Oleksii Vilchanskyi
2017-12-09 12:57:15 +01:00
parent d6782ffc4c
commit 45d1885094
13 changed files with 29 additions and 47 deletions
+2
View File
@@ -10,6 +10,8 @@ if [[ "$QMAKE" != "" ]]; then
exit $?
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
export QMAKE_MACOSX_DEPLOYMENT_TARGET=10.10
# OSX: Look for qmake in standard install locations
QMAKE=`find ~/Qt/*/clang_64/bin ~/Qt5*/*/clang_64/bin ~/Applications/Qt/*/clang_64/bin ~/Applications/Qt5*/*/clang_64/bin /Applications/Qt/*/clang_64/bin /Applications/Qt5*/*/clang_64/bin /usr/local/opt/qt5/bin -name qmake -print -quit 2>/dev/null`
[[ $QMAKE == "" ]] && die
-27
View File
@@ -70,25 +70,6 @@ if [ -d "/usr/bin/ckb-animations" ]; then
echo "Done"
fi
# Workaround unknown qmake bug on macOS at configuration stage which happens at generation stage
# Assumes Homebrew is installed
# Assumes 'qt' package by 'brew' command is installed
# TODO: track down the version where the bug is not triggered and do not apply for older versions
# TODO: try shooting yourself in the head with BSD utils to dynamically resolve /usr/local/opt/qt
echo "Applying required qmake workaround"
if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ ! -d "/usr/local/Cellar/qt/5.9.1" ]]; then
echo "Error: Cannot apply the workaround. The script assumes Homebrew is installed \
and the 'qt' package is installed using it (version 5.9.1). \
If you have installed the official Qt package, edit this script and provide proper paths \
or install Qt with Homebrew."
finish 101
fi
sed -i '' "s/version_min_flag = -m\$\${version_identifier}-version-min=\$\$deployment_target/\
version_min_flag = -m\$\${version_identifier}-version-min=10\.10/" \
/usr/local/Cellar/qt/5.9.1/mkspecs/features/mac/default_post.prf
fi
if [[ -d $SRCDIR ]]; then
echo "Preparing build files..."
# Clean up first
@@ -119,14 +100,6 @@ if [[ ! -d $BINDIR ]]; then
finish 0
fi
# "Unapply" the workaround
echo "Unapplying qmake workaround"
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/version_min_flag = -m\$\${version_identifier}-version-min=10\.10/\
version_min_flag = -m\$\${version_identifier}-version-min=\$\$deployment_target/" \
/usr/local/Cellar/qt/5.9.1/mkspecs/features/mac/default_post.prf
fi
# Offer to install ckb at a standard location
shopt -s nocasematch
read -rp "Install ckb system-wide [Y/n]? " doinstall
+2 -2
View File
@@ -14,10 +14,10 @@ macx {
}
QMAKE_CFLAGS += -std=gnu11 -Wall -Wextra -fsigned-char
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
# Minimal build - remove Qt defaults
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
CKB_VERSION_STR = `cat $$PWD/../../VERSION | tr -d '\n'`
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-gradient
QMAKE_CFLAGS += -std=c99
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS =
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-heat
QMAKE_CFLAGS += -std=c99
QMAKE_MAC_SDK = macosx10.10
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS = -lm
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-mviz
QMAKE_CFLAGS += -std=c99
QMAKE_MAC_SDK = macosx10.10
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS += -lpulse-simple
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-pinwheel
QMAKE_CFLAGS += -std=c99
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS =
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-rain
QMAKE_CFLAGS += -std=c99
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS =
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-random
QMAKE_CFLAGS += -std=c99
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS =
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-ripple
QMAKE_CFLAGS += -std=c99
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS =
+3 -2
View File
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = ckb-wave
QMAKE_CFLAGS += -std=c99
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
macx {
DESTDIR = $$PWD/../../ckb.app/Contents/Resources/ckb-animations
@@ -10,7 +10,8 @@ macx {
DESTDIR = $$PWD/../../bin/ckb-animations
}
CONFIG = debug_and_release
CONFIG += debug_and_release
CONFIG -= app_bundle
QT =
LIBS =
+1 -1
View File
@@ -5,7 +5,7 @@
<key>CFBundleExecutable</key>
<string>ckb</string>
<key>CFBundleIconFile</key>
<string>ckb-logo.icns</string>
<string>@ICON@</string>
<key>CFBundleName</key>
<string>ckb</string>
<key>LSUIElement</key>
-1
View File
@@ -22,7 +22,6 @@ macx {
}
# OSX settings
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
ICON = ckb-logo.icns
QMAKE_INFO_PLIST = ckb-info.plist
macx {