1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 07:41:46 -05:00

Don't use absolute path, as build directory may be somewhere else.

This commit is contained in:
Jon Beniston 2024-10-31 21:12:15 +00:00
parent e707d75624
commit 32a9144f55

View File

@ -1,14 +1,15 @@
# This CPACK_PRE_BUILD_SCRIPTS script is used to copy all required Qt and other 3rd party libraries (SDR drivers and codecs) in to the .app bundle
# It is run in a staging area (${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app) after all targets have been installed (E.g. sdrangel exe and plugins)
# The copying of frameworks and libraries is mostly done by 'macdeployqt', however, in order for 'macdeployqt' to copy libraries built by external/CMakeLists.txt,
# we first need to add RPATHs into the libraries giving the locations of any libraries they might depend on.
# we first need to add RPATHs into the libraries giving the locations of any libraries they might depend on.
# These paths are in the variable MACOS_EXTERNAL_LIBS_FIXUP set in externals/CMakeLists.txt
# Is there an easier way to this?
# Copy executable that will be run when icon in /Applications is clicked
message ("Copying default executable to SDRangel.app/Contents/MacOS/SDRangel")
execute_process (COMMAND mkdir ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app/Contents/MacOS/)
execute_process (COMMAND cp /opt/build/sdrangel/build/sdrangel ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app/Contents/MacOS/SDRangel)
execute_process (COMMAND pwd)
execute_process (COMMAND cp sdrangel ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/SDRangel.app/Contents/MacOS/SDRangel)
# Add RPATHS to libraries so macdeployqt can find out and copy all dependencies