1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1103 Some minor cleanup work and adding a version check for Qt5.1

This commit is contained in:
Patrick Huebner 2013-11-13 21:04:57 +11:00
parent b151ff3fed
commit b4d0a93133
4 changed files with 11 additions and 68 deletions

View File

@ -3,12 +3,18 @@
# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org
#
#version check qt
contains(QT_VERSION, ^4\\.[0-7]\\..*) {
message("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}.")
error("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}. Use at least Qt 4.8!")
}
cache()
#check Qt version
QT_VERSION = $$[QT_VERSION]
QT_VERSION = $$split(QT_VERSION, ".")
QT_VER_MAJ = $$member(QT_VERSION, 0)
QT_VER_MIN = $$member(QT_VERSION, 1)
lessThan(QT_VER_MAJ, 5) | lessThan(QT_VER_MIN, 1) {
error(OpenPilot GCS requires Qt 5.1.0 or newer but Qt $$[QT_VERSION] was detected.)
}
macx {
# This ensures that code is compiled with the /usr/bin version of gcc instead
# of the gcc in XCode.app/Context/Development

View File

@ -20,7 +20,6 @@ HEADERS += configplugin.h \
configpipxtremewidget.h \
configstabilizationwidget.h \
assertions.h \
#calibration.h \
defaultattitudewidget.h \
defaulthwsettingswidget.h \
inputchannelform.h \
@ -51,10 +50,7 @@ SOURCES += configplugin.cpp \
configccattitudewidget.cpp \
configstabilizationwidget.cpp \
configpipxtremewidget.cpp \
#twostep.cpp \
legacy-calibration.cpp \
#gyro-calibration.cpp \
#alignment-calibration.cpp \
defaultattitudewidget.cpp \
defaulthwsettingswidget.cpp \
inputchannelform.cpp \

View File

@ -29,7 +29,6 @@
#define OPHID_CONST_H
#include "QtDebug"
//#define printf qDebug
#define OPHID_DEBUG_ON 1
#ifdef OPHID_DEBUG_ON
#define OPHID_DEBUG(fmt, args ...) qDebug("[DEBUG] "fmt,##args)

View File

@ -39,51 +39,6 @@ do
done
done
#echo "Copying other libraries that were missed"
# should be redundant but some libs missed by main app and macdeployqt
#for f in ${QT_LIBS}
#do
#echo "Copying ${f}"
#cp -a "${QT_FRAMEWORKS}/${f}.framework" "${APP}/Contents/Frameworks/"
#echo "Changing package identification of ${f}"
#install_name_tool -id \
#@executable_path/../Frameworks/${f}.framework/Versions/5/${f} \
#"${APP}/Contents/Frameworks/${f}.framework/Versions/5/${f}"
#rm "${APP}/Contents/Frameworks/${f}.framework/${f}"
#echo "Changing package linkages"
#for g in $QT_LIBS
#do
#install_name_tool -change \
#"${QT_DIR}${g}.framework/Versions/5/${g}" \
#@executable_path/../Frameworks/${g}.framework/Versions/5/${g} \
#"${APP}/Contents/Frameworks/${f}.framework/Versions/5/${f}"
#done
#done
#for f in ${QT_EXTRA}
#do
#echo "Copying package ${f}"
#d=$(dirname ${f})
#[ ! -d "${APP}/Contents/Plugins/${d}" ] && mkdir "${APP}/Contents/Plugins/${d}"
#cp "${QT_PLUGINS}/${f}" "${APP}/Contents/Plugins/${f}"
#echo "Changing package identification of ${f}"
#install_name_tool -id \
#@executable_path/../Plugins/${f} \
#"${PLUGINS}/${f}"
#echo "Changing package linkages"
#for g in $QT_LIBS
#do
#install_name_tool -change \
#"${QT_DIR}${g}.framework/Versions/5/${g}" \
#@executable_path/../Frameworks/${g}.framework/Versions/5/${g} \
#"${APP}/Contents/Plugins/${f}"
#done
#done
echo "Copying SDL"
cp -a "/Library/Frameworks/SDL.framework" "${APP}/Contents/Frameworks/"
@ -96,19 +51,6 @@ install_name_tool -change \
"@executable_path/../Frameworks/SDL.framework/SDL" \
"${APP}/Contents/Plugins/libsdlgamepad.1.dylib"
# echo "Copying OSG libraries"
# for f in ${OSG_EXTRA}
# do
# echo "Copying library ${f}"
# cp /usr/local/lib/{$f} "${APP}/Contents/Plugins/${f}"
# echo "Changing package identification of ${f}
# install_name_tool -id \
# @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \
# "${APP}/Contents/Frameworks/SDL.framework/Versions/A/SDL"
#done
# deleting unnecessary files
echo "Deleting unnecessary files"
# find "${APP}/Contents/Frameworks" -iname "current" -exec rm -rf \{\} \;
# find "${APP}/Contents/Frameworks" -iname "4.0" -exec rm -rf \{\} \;
find "${APP}/Contents/Frameworks" -iname "*_debug" -exec rm -rf \{\} \;