1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore: Update build scripts

Migration from qmake on cmake
This commit is contained in:
Diadlo 2017-01-25 00:21:54 +03:00 committed by Zetok Zalbavar
parent 0fbac6862f
commit 5694f97d58
No known key found for this signature in database
GPG Key ID: C953D3880212068A
3 changed files with 7 additions and 10 deletions

View File

@ -151,12 +151,12 @@ export PKG_CONFIG_PATH="$PWD/libs/lib/pkgconfig"
# first build qTox without support for optional dependencies
echo '*** BUILDING "MINIMAL" VERSION ***'
qmake qtox.pro QMAKE_CC="$CC" QMAKE_CXX="$CXX" ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND=NO ENABLE_SYSTRAY_GTK_BACKEND=NO DISABLE_PLATFORM_EXT=YES SMILEYS=DISABLED
cmake . -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND=NO -DENABLE_SYSTRAY_GTK_BACKEND=NO -DDISABLE_PLATFORM_EXT=YES -DSMILEYS=DISABLED
# ↓ reduce if build fails with OOM
make -j$(nproc)
# clean it up, and build normal version
make clean
echo '*** BUILDING "FULL" VERSION ***'
qmake qtox.pro QMAKE_CC="$CC" QMAKE_CXX="$CXX"
cmake . -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX"
# ↓ reduce if build fails with OOM
make -j$(nproc)

View File

@ -40,7 +40,6 @@ QT_DIR="/usr/local/Cellar/qt5" # Folder name of QT install
QT_VER=($(ls ${QT_DIR} | sed -n -e 's/^\([0-9]*\.([0-9]*\.([0-9]*\).*/\1/' -e '1p;$p'))
QT_DIR_VER="${QT_DIR}/${QT_VER[1]}"
QMAKE="${QT_DIR_VER}/bin/qmake" # Don't change
MACDEPLOYQT="${QT_DIR_VER}/bin/macdeployqt" # Don't change
TOXCORE_DIR="${MAIN_DIR}/toxcore" # Change to Git location
@ -226,8 +225,8 @@ build() {
mkdir $BUILD_DIR
cd $BUILD_DIR
fcho "Now working in ${PWD}"
fcho "Starting qmake ... "
$QMAKE $QTOX_DIR/qtox.pro
fcho "Starting cmake ... "
cmake $QTOX_DIR
make
}

View File

@ -27,6 +27,7 @@ apt_install() {
qt5-default
qt5-qmake
qttools5-dev-tools
cmake
)
local codename=$(lsb_release -c -s)
@ -134,6 +135,7 @@ zypper_install() {
patterns-openSUSE-devel_basis
qrencode-devel
sqlcipher-devel
cmake
)
sudo zypper in "${zypper_packages[@]}"
}
@ -157,11 +159,7 @@ main() {
fi
./bootstrap.sh
if [ -e /etc/redhat-release -o -e /etc/zypp ]; then
qmake-qt5
else
qmake
fi
cmake .
make -j$(nproc)
}
main