Dynamically load cuda/nvenc
This commit is contained in:
+1
-12
@@ -31,7 +31,7 @@ option(WIVRN_BUILD_CLIENT "Build WiVRn client" OFF)
|
||||
option(WIVRN_BUILD_SERVER "Build WiVRn server" ON)
|
||||
option(WIVRN_BUILD_DISSECTOR "Build Wireshark dissector" OFF)
|
||||
|
||||
auto_option(WIVRN_USE_NVENC "Enable nvenc (Nvidia) hardware encoder" AUTO)
|
||||
option(WIVRN_USE_NVENC "Enable nvenc (Nvidia) hardware encoder" ON)
|
||||
auto_option(WIVRN_USE_VAAPI "Enable vaapi (AMD/Intel) hardware encoder" AUTO)
|
||||
auto_option(WIVRN_USE_X264 "Enable x264 software encoder" AUTO)
|
||||
|
||||
@@ -72,17 +72,6 @@ if (WIVRN_BUILD_SERVER)
|
||||
message(FATAL_ERROR "No encoder selected, use at least one of WIVRN_USE_NVENC, WIVRN_USE_VAAPI or WIVRN_USE_X264")
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_NVENC STREQUAL "AUTO")
|
||||
find_package(CUDAToolkit)
|
||||
if (CUDAToolkit_FOUND)
|
||||
set(WIVRN_USE_NVENC ON)
|
||||
else()
|
||||
set(WIVRN_USE_NVENC OFF)
|
||||
endif()
|
||||
elseif(WIVRN_USE_NVENC)
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_VAAPI STREQUAL "AUTO")
|
||||
pkg_check_modules(LIBAV IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
|
||||
pkg_check_modules(LIBDRM IMPORTED_TARGET libdrm)
|
||||
|
||||
Reference in New Issue
Block a user