1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-22 17:45:48 -05:00

Install CUDA runtime

This commit is contained in:
Jon Beniston 2023-08-14 12:55:14 +01:00
parent 3ce2f28502
commit 3e2addac05
2 changed files with 21 additions and 1 deletions

View File

@ -236,6 +236,19 @@ elseif(WIN32 OR MINGW)
)
endforeach(libsigmf_dll)
if(${VKFFT_BACKEND} EQUAL 1)
find_package(CUDA)
if(CUDA_FOUND)
file(GLOB CUDA_DLLS "${CUDA_TOOLKIT_ROOT_DIR}/bin/nvrtc*${CMAKE_SHARED_LIBRARY_SUFFIX}")
foreach(cuda_dll ${CUDA_DLLS})
get_filename_component(cuda_dll_name "${cuda_dll}" NAME)
add_custom_target(copy_cuda_${cuda_dll_name} ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${cuda_dll}" "${SDRANGEL_BINARY_BIN_DIR}/"
)
endforeach(cuda_dll)
endif()
endif()
# TODO we need a way to fixup_bundle() on the build bin/ directory without call install
if(BUILD_GUI)
install(CODE "
@ -295,7 +308,11 @@ elseif(WIN32 OR MINGW)
# libsigmf
install(DIRECTORY "${LIBSIGMF_DLL_DIR}/" DESTINATION "${INSTALL_LIB_DIR}"
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
# CUDA runtime
if((${VKFFT_BACKEND} EQUAL 1) AND CUDA_FOUND)
install(DIRECTORY "${CUDA_TOOLKIT_ROOT_DIR}/bin" DESTINATION "${INSTALL_LIB_DIR}"
FILES_MATCHING PATTERN "nvrtc*${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
install(CODE "
# remove *.lib files

View File

@ -59,6 +59,9 @@ if (${VKFFT_BACKEND} EQUAL 1)
dsp/cudavkfftengine.h
)
endif()
if(WIN32)
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS ${WINDOWS_FIXUP_BUNDLE_LIB_DIRS} ${CUDA_TOOLKIT_ROOT_DIR}/bin PARENT_SCOPE)
endif()
endif()
if((Vulkan_FOUND AND (${VKFFT_BACKEND} EQUAL 0)) OR (CUDA_FOUND AND (${VKFFT_BACKEND} EQUAL 1)))