summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-07 21:47:38 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-07 21:50:10 +0800
commit3a995b4fb5d34b967212a61b065ad6e14422179a (patch)
tree57b90e879f3a71b1137fc57305ecefd788420d91 /indra
parent4d93da06a3dd623d9c75841d6c91ef43ff7fa9f3 (diff)
Open VLC dmg automatically
It's assumed any relevant VLC dmg has been downloaded to ~/Downloads/.
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/LibVLCPlugin.cmake27
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake
index 9f0419c5e6..e2ecb8b248 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -5,26 +5,37 @@ include(Prebuilt)
include_guard()
add_library( ll::libvlc INTERFACE IMPORTED )
-if (USE_AUTOBUILD_3P OR USE_CONAN)
-use_prebuilt_binary(vlc-bin)
-set(LIBVLCPLUGIN ON CACHE BOOL
- "LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
-else ()
+if (USESYSTEMLIBS)
+
if (DARWIN)
+ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64)
+ execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg)
+ elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
+ 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 ()
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 )
- else ()
+ else (DARWIN)
include(FindPkgConfig)
pkg_check_modules(Libvlc REQUIRED libvlc vlc-plugin)
target_include_directories( ll::libvlc SYSTEM INTERFACE ${Libvlc_INCLUDE_DIRS} )
target_link_directories( ll::libvlc INTERFACE ${Libvlc_LIBRARY_DIRS} )
target_link_libraries( ll::libvlc INTERFACE ${Libvlc_LIBRARIES} )
- endif ()
+ endif (DARWIN)
set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
return()
-endif ()
+
+else (USESYSTEMLIBS)
+
+use_prebuilt_binary(vlc-bin)
+set(LIBVLCPLUGIN ON CACHE BOOL
+ "LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
+
+endif (USESYSTEMLIBS)
if (WINDOWS)
target_link_libraries( ll::libvlc INTERFACE