Skip to content
Snippets Groups Projects
Commit 89e90672 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Jean-Baptiste Kempf
Browse files

darwin: redirect VLC_PKG_LIB_DIR/plugins on iOS

On iOS and tvOS, dylibs must be wrapped into a framework and frameworks
must be flattened into the frameworks/ application directory (or global
to the system which is not possible in the general case), so dylibs
can't be in the VLC_PKG_LIB_DIR/plugins folder. Redirect
VLC_PKG_LIB_DIR/plugins toward VLC_PKG_LIB_DIR/ on those platforms.
parent 70d3002b
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@
#include <dlfcn.h>
#include <Foundation/Foundation.h>
#include <TargetConditionals.h>
static bool config_isBundle()
{
......@@ -104,6 +105,13 @@ char *config_GetSysPath(vlc_sysdir_t type, const char *filename)
case VLC_PKG_LIB_DIR:
dir = config_getLibraryDirReal(PKGLIBDIR);
/* On iOS and tvOS, dylibs must be located in frameworks and
* frameworks must be flatten in the frameworks/ directory.
* To respect that, redirect plugins directory to flatten it. */
#if TARGET_OS_IPHONE
if (filename && strcmp("plugins", filename) == 0)
return dir;
#endif
break;
case VLC_LIB_DIR:
dir = config_getLibraryDirReal(LIBDIR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment