Commit 1303fb1d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

cmake: macos: Fix application bundle for local run

parent 6d42f3ac
#!/bin/bash
if [ $# -lt 2 ] ; then
echo "Usage: $0 <vlmc_binary_path> <libvlc_dir>"
exit 1
fi
VLMC_BIN_DIR=$1
VLMC_BIN="$VLMC_BIN_DIR/vlmc"
LIBVLC_DIR=$2
install_name_tool -change @loader_path/lib/libvlc.5.dylib @executable_path/lib/libvlc.5.dylib $VLMC_BIN
install_name_tool -change @loader_path/lib/libvlccore.7.dylib @executable_path/lib/libvlccore.7.dylib $VLMC_BIN
ln -Fs $LIBVLC_DIR/../lib $VLMC_BIN_DIR
ln -Fs $LIBVLC_DIR/../plugins $VLMC_BIN_DIR
...@@ -277,18 +277,16 @@ IF(UNIX) ...@@ -277,18 +277,16 @@ IF(UNIX)
ENDIF(WITH_PROFILING) ENDIF(WITH_PROFILING)
ENDIF(UNIX) ENDIF(UNIX)
IF( APPLE ) if( APPLE )
SET(CONTRIBS_DIR ${CMAKE_SOURCE_DIR}/contribs/) set(APPLICATION_BUNDLE ${CMAKE_BINARY_DIR}/bin/vlmc.app)
ADD_CUSTOM_COMMAND( set(APPLICATION_LIB_DIR ${LIBVLC_LIB_DIR})
TARGET vlmc
POST_BUILD # re-enable this when we start addressing redistribution
COMMAND cp -r ${CONTRIBS_DIR}/include ${CONTRIBS_DIR}/lib ${CONTRIBS_DIR}/plugins ${CONTRIBS_DIR}/effects ${CONTRIBS_DIR}/ts ${CMAKE_CURRENT_BINARY_DIR}/../bin/vlmc.app/Contents/MacOS # message(STATUS "Looking for bundle ${APPLICATION_BUNDLE} with library path ${APPLICATION_LIB_DIR}")
) # install(CODE "include(BundleUtilities)
ADD_CUSTOM_COMMAND( add_custom_command(TARGET vlmc
TARGET vlmc
POST_BUILD POST_BUILD
COMMAND macdeployqt ${CMAKE_CURRENT_BINARY_DIR}/../bin/vlmc.app -no-plugins #-dmg COMMAND ${CMAKE_SOURCE_DIR}/cmake/FixBundle.sh ${APPLICATION_BUNDLE}/Contents/MacOS ${LIBVLC_LIB_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Fixing application bundle for local run")
COMMENT "Deploying the Qt Framework onto the bundle" # fixup_bundle(\"${APPLICATION_BUNDLE}\" \"\" \"${APPLICATION_LIB_DIR}\")" COMPONENT Runtime)
) endif()
ENDIF( APPLE )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment