diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f4ffaa5c..9727f5e31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,10 +300,14 @@ elseif (WIN32) set(FFTW3F_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/include" CACHE INTERNAL "") set(FFTW3F_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/libfftw3f-3.lib" CACHE INTERNAL "") set(FFTW3F_WISDOM "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/fftwf-wisdom.exe" CACHE INTERNAL "") + set(FFTW3F_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/fftw-3" CACHE INTERNAL "") + set(LIBUSB_FOUND ON CACHE INTERNAL "") set(LIBUSB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libusb/include" CACHE INTERNAL "") set(LIBUSB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll/libusb-1.0.lib" CACHE INTERNAL "") - if(VS2019) + set(LIBUSB_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll" CACHE INTERNAL "") + +if(VS2019) set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv4" CACHE INTERNAL "") else() set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv" CACHE INTERNAL "") diff --git a/cmake/cpack/CMakeLists.txt b/cmake/cpack/CMakeLists.txt index 80a78c404..704efac23 100644 --- a/cmake/cpack/CMakeLists.txt +++ b/cmake/cpack/CMakeLists.txt @@ -168,6 +168,22 @@ elseif(WIN32 OR MINGW) endforeach(soapysupport_dll) endif() + file(GLOB FFTW3F_DLLS "${FFTW3F_DLL_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}") + foreach(fftw3f_dll ${FFTW3F_DLLS}) + get_filename_component(fftw3f_dll_name "${fftw3f_dll}" NAME) + add_custom_target(copy_fftw3f_${fftw3f_dll_name} ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${fftw3f_dll}" "${SDRANGEL_BINARY_BIN_DIR}/" + ) + endforeach(fftw3f_dll) + + file(GLOB LIBUSB_DLLS "${LIBUSB_DLL_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}") + foreach(libusb_dll ${LIBUSB_DLLS}) + get_filename_component(libusb_dll_name "${libusb_dll}" NAME) + add_custom_target(copy_libusb_${libusb_dll_name} ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${libusb_dll}" "${SDRANGEL_BINARY_BIN_DIR}/" + ) + endforeach(libusb_dll) + file(GLOB CODEC2_DLLS "${CODEC2_DLL_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}") foreach(codec2_dll ${CODEC2_DLLS}) get_filename_component(codec2_dll_name "${codec2_dll}" NAME)