From 09e68a49535a15f89b2c28e523a81fed1770ee61 Mon Sep 17 00:00:00 2001
From: callum_linden <none@none>
Date: Fri, 13 May 2016 16:43:18 -0700
Subject: [PATCH] Additional set of changes to use vlc-bin package

---
 indra/cmake/LibVLCPlugin.cmake            | 6 ++++++
 indra/media_plugins/libvlc/CMakeLists.txt | 3 ++-
 indra/newview/viewer_manifest.py          | 6 ++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake
index 286a8d8d1bf..0d2c46bac04 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -6,11 +6,17 @@ if (USESYSTEMLIBS)
     set(LIBVLCPLUGIN OFF CACHE BOOL
         "LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
 else (USESYSTEMLIBS)
+    use_prebuilt_binary(vlc-bin)
     set(LIBVLCPLUGIN ON CACHE BOOL
         "LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
+        set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc)
 endif (USESYSTEMLIBS)
 
 if (WINDOWS)
+    set(VLC_PLUGIN_LIBRARIES
+        libvlc.lib
+        libvlccore.lib
+    )
 elseif (DARWIN)
 elseif (LINUX)
 endif (WINDOWS)
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 1b6adaa2901..535d29125b7 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -24,6 +24,7 @@ include_directories(
     ${LLIMAGE_INCLUDE_DIRS}
     ${LLRENDER_INCLUDE_DIRS}
     ${LLWINDOW_INCLUDE_DIRS}
+    ${VLC_INCLUDE_DIR}
 )
 include_directories(SYSTEM
     ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
@@ -53,7 +54,7 @@ target_link_libraries(media_plugin_libvlc
   ${LLPLUGIN_LIBRARIES}
   ${MEDIA_PLUGIN_BASE_LIBRARIES}
   ${LLCOMMON_LIBRARIES}
-  ${LIBVLC_PLUGIN_LIBRARIES}
+  ${VLC_PLUGIN_LIBRARIES}
   ${PLUGIN_API_WINDOWS_LIBRARIES}
 )
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9302dd8e032..e7f517518b5 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -547,6 +547,12 @@ def construct(self):
             self.path("zh-TW.pak")
             self.end_prefix()
 
+            if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"):
+                self.path("libvlc.dll")
+                self.path("libvlccore.dll")
+                self.path("plugins/")
+                self.end_prefix()
+
         # pull in the crash logger and updater from other projects
         # tag:"crash-logger" here as a cue to the exporter
         self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
-- 
GitLab