function(gp_item_default_embedded_path_override path)
  set(path "@executable_path" PARENT_SCOPE)
endfunction()

include(BundleUtilities)

set(plugins "")
list(APPEND plugins "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/plugins/imageformats/@GIF_PLUGIN_NAME@")
list(APPEND plugins "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/plugins/imageformats/@ICO_PLUGIN_NAME@")
list(APPEND plugins "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/plugins/imageformats/@JPEG_PLUGIN_NAME@")
list(APPEND plugins "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/plugins/imageformats/@TIFF_PLUGIN_NAME@")
list(APPEND plugins "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/plugins/platforms/@QPA_PLUGIN_NAME@")

fixup_bundle("${CMAKE_INSTALL_PREFIX}/bin/rvu@CMAKE_EXECUTABLE_SUFFIX@" "${plugins}" "@QT_LIBRARY_DIR@;@X11_LIBRARY_DIR@")
