Skip to content

Commit

Permalink
CMake: Fix MacOS GStreamer RPath
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Nov 18, 2024
1 parent 1765ee7 commit cb58f99
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cmake/CreateMacDMG.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# include(BundleUtilities)

# message(STATUS "Copy GStreamer framework into bundle")
message(STATUS "Copy GStreamer framework into bundle")
file(COPY /Library/Frameworks/GStreamer.framework DESTINATION staging/QGroundControl.app/Contents/Frameworks)
file(REMOVE_RECURSE staging/QGroundControl.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/bin)
file(REMOVE_RECURSE staging/QGroundControl.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/etc)
Expand All @@ -23,14 +23,8 @@ file(REMOVE ${REMOVE_LIB_FILES})
file(REMOVE_RECURSE staging/QGroundControl.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/include)
file(REMOVE_RECURSE staging/QGroundControl.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0/pkgconfig)

# # Fix up library paths to point into bundle
execute_process(COMMAND install_name_tool -change @rpath/libgstgl-1.0.0.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libgstgl-1.0.0.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
execute_process(COMMAND install_name_tool -change @rpath/libgstvideo-1.0.0.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libgstvideo-1.0.0.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
execute_process(COMMAND install_name_tool -change @rpath/libgstbase-1.0.0.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libgstbase-1.0.0.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
execute_process(COMMAND install_name_tool -change @rpath/libgstreamer-1.0.0.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libgstreamer-1.0.0.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
execute_process(COMMAND install_name_tool -change @rpath/libgobject-2.0.0.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libgobject-2.0.0.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
execute_process(COMMAND install_name_tool -change @rpath/libglib-2.0.0.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libglib-2.0.0.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
execute_process(COMMAND install_name_tool -change @rpath/libintl.8.dylib @executable_path/../Frameworks/GStreamer.framework/Libraries/libintl.8.dylib staging/QGroundControl.app/Contents/MacOS/QGroundControl)
# Fix up library paths to point into bundle
execute_process(COMMAND install_name_tool -change /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer @executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer staging/QGroundControl.app/Contents/MacOS/QGroundControl)

message(STATUS "Creating Mac DMG")
file(REMOVE_RECURSE package)
Expand Down

0 comments on commit cb58f99

Please sign in to comment.