mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fix building with precompiled QT (rpath fix), fix build-compaion.sh script
This commit is contained in:
parent
9f67c0c49b
commit
a19f4c78bf
2 changed files with 24 additions and 2 deletions
|
@ -427,6 +427,13 @@ if(APPLE)
|
||||||
INSTALL(FILES ${DFU_UTIL_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime)
|
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")
|
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)
|
# Include depencies (adding frameworks, fixing the embbeded libraries)
|
||||||
# I get write errors without setting BU_CHMOD_BUNDLE_ITEMS even though it is
|
# 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 ....)
|
# technically a hack (that is already is in the Bundle library ....)
|
||||||
|
@ -434,7 +441,7 @@ if(APPLE)
|
||||||
include(BundleUtilities)
|
include(BundleUtilities)
|
||||||
file(GLOB bundle_simulator_libs \"\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
file(GLOB bundle_simulator_libs \"\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
||||||
set(BU_CHMOD_BUNDLE_ITEMS on)
|
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\")
|
file(RENAME \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_NAME}.app\" \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_OSX_FINAL_NAME}.app\")
|
||||||
" COMPONENT Runtime)
|
" COMPONENT Runtime)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -8,8 +8,19 @@ SRCDIR=$1
|
||||||
OUTDIR=$2
|
OUTDIR=$2
|
||||||
|
|
||||||
COMMON_OPTIONS="-DALLOW_NIGHTLY_BUILDS=YES -DVERSION_SUFFIX=$3 -DGVARS=YES -DHELI=YES"
|
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"
|
STM32_OPTIONS="${COMMON_OPTIONS} -DLUA=YES"
|
||||||
|
|
||||||
|
if [ "$3" == "" ]; then
|
||||||
|
echo "Usage $0 SRCDIR OUTDIR VERSION_SUFFIX"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
@ -46,4 +57,8 @@ make -j2 libsimulator
|
||||||
|
|
||||||
make -j2 package
|
make -j2 package
|
||||||
|
|
||||||
cp *.deb ${OUTDIR}
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
|
cp *.dmg ${OUTDIR}
|
||||||
|
else
|
||||||
|
cp *.deb ${OUTDIR}
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue