1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Fix building with precompiled QT (rpath fix), fix build-compaion.sh script

This commit is contained in:
Arne Schwabe 2016-10-19 08:08:52 +02:00
parent 9f67c0c49b
commit a19f4c78bf
2 changed files with 24 additions and 2 deletions

View file

@ -427,6 +427,13 @@ if(APPLE)
INSTALL(FILES ${DFU_UTIL_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime)
set(bundle_dfu_util_path "\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/dfu-util")
# these needs to be relative to CMAKE_INSTALL_PREFIX
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)
# Include depencies (adding frameworks, fixing the embbeded libraries)
# I get write errors without setting BU_CHMOD_BUNDLE_ITEMS even though it is
# technically a hack (that is already is in the Bundle library ....)
@ -434,7 +441,7 @@ if(APPLE)
include(BundleUtilities)
file(GLOB bundle_simulator_libs \"\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
set(BU_CHMOD_BUNDLE_ITEMS on)
fixup_bundle(\"${APPS}\" \"\${bundle_simulator_libs};${bundle_qt_libs};${bundle_dfu_util_path}\" \"\")
fixup_bundle(\"${APPS}\" \"\${bundle_simulator_libs};${bundle_qt_libs};${bundle_dfu_util_path}\" \"${QT_LIBRARY_DIR}\")
file(RENAME \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_NAME}.app\" \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_OSX_FINAL_NAME}.app\")
" COMPONENT Runtime)
endif()

View file

@ -8,8 +8,19 @@ SRCDIR=$1
OUTDIR=$2
COMMON_OPTIONS="-DALLOW_NIGHTLY_BUILDS=YES -DVERSION_SUFFIX=$3 -DGVARS=YES -DHELI=YES"
if [ "$(uname)" = "Darwin" ]; then
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_PREFIX_PATH=~/Qt/5.7/clang_64/ -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
fi
STM32_OPTIONS="${COMMON_OPTIONS} -DLUA=YES"
if [ "$3" == "" ]; then
echo "Usage $0 SRCDIR OUTDIR VERSION_SUFFIX"
exit 1
fi
rm -rf build
mkdir build
cd build
@ -46,4 +57,8 @@ make -j2 libsimulator
make -j2 package
cp *.deb ${OUTDIR}
if [ "$(uname)" = "Darwin" ]; then
cp *.dmg ${OUTDIR}
else
cp *.deb ${OUTDIR}
fi