Meta: Download USB and PCI ID data with fallible download function

This commit is contained in:
Timothy Flynn 2022-01-25 18:44:44 -05:00 committed by Linus Groh
parent e2bcf5fafd
commit 6f8e89a905
Notes: sideshowbarker 2024-07-17 20:12:36 +09:00

View file

@ -286,8 +286,7 @@ set(PCI_IDS_PATH ${CMAKE_BINARY_DIR}/${PCI_IDS_FILE})
set(PCI_IDS_INSTALL_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${PCI_IDS_FILE})
if(ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS ${PCI_IDS_GZ_PATH})
message(STATUS "Downloading PCI ID database from ${PCI_IDS_GZ_URL}...")
file(DOWNLOAD ${PCI_IDS_GZ_URL} ${PCI_IDS_GZ_PATH} INACTIVITY_TIMEOUT 10)
download_file("${PCI_IDS_GZ_URL}" "${PCI_IDS_GZ_PATH}")
endif()
if(EXISTS ${PCI_IDS_GZ_PATH} AND NOT EXISTS ${PCI_IDS_INSTALL_PATH})
@ -303,8 +302,7 @@ set(USB_IDS_PATH ${CMAKE_BINARY_DIR}/${USB_IDS_FILE})
set(USB_IDS_INSTALL_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${USB_IDS_FILE})
if(ENABLE_USB_IDS_DOWNLOAD AND NOT EXISTS ${USB_IDS_GZ_PATH})
message(STATUS "Downloading USB ID database from ${USB_IDS_GZ_URL}...")
file(DOWNLOAD ${USB_IDS_GZ_URL} ${USB_IDS_GZ_PATH} INACTIVITY_TIMEOUT 10)
download_file("${USB_IDS_GZ_URL}" "${USB_IDS_GZ_PATH}")
endif()
if(EXISTS ${USB_IDS_GZ_PATH} AND NOT EXISTS ${USB_IDS_INSTALL_PATH})