summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-12 14:02:36 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-12 14:02:36 +0800
commit5c34a90bea4506ac965817596378a97ae5895a64 (patch)
tree9d30f89014a580c99a686766c803f99765264b1b /indra/cmake
parent2caff153c35274de15276b3cae10c7df54dacfc2 (diff)
Download VLC dmg automatically
and building only for one architecture at a time is the one supported now.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/LibVLCPlugin.cmake31
1 files changed, 24 insertions, 7 deletions
diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake
index e2ecb8b248..c6f1423322 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -6,15 +6,34 @@ include_guard()
add_library( ll::libvlc INTERFACE IMPORTED )
if (USESYSTEMLIBS)
-
if (DARWIN)
if (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+ if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0)
+ execute_process(COMMAND curl
+ -L
+ https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg
+ -o
+ $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg
+ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}
+ RESULT_VARIABLE vlc_installed
+ )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}")
+ endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0)
execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg)
- elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
+ else (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+ if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0)
+ execute_process(COMMAND curl
+ -L
+ https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg
+ -o
+ $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg
+ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}
+ RESULT_VARIABLE vlc_installed
+ )
+ file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}")
+ endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0)
execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg)
- else ()
- execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-universal.dmg)
- endif ()
+ endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
target_include_directories( ll::libvlc SYSTEM INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/include)
target_link_directories( ll::libvlc INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib)
target_link_libraries( ll::libvlc INTERFACE vlc vlccore )
@@ -28,13 +47,11 @@ if (USESYSTEMLIBS)
set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
return()
-
else (USESYSTEMLIBS)
use_prebuilt_binary(vlc-bin)
set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
-
endif (USESYSTEMLIBS)
if (WINDOWS)