mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Download pci.ids and usb.ids to Build/caches
This ensures we only need to download these files once for all build configurations. We similarly download the UCD, CLDR, and TZDB to this cache directory as well.
This commit is contained in:
parent
6ff85aa19a
commit
c11860bdcd
Notes:
sideshowbarker
2024-07-17 08:13:43 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/c11860bdcd Pull-request: https://github.com/SerenityOS/serenity/pull/17859
1 changed files with 12 additions and 8 deletions
|
@ -246,17 +246,21 @@ export_components("${CMAKE_BINARY_DIR}/components.ini")
|
|||
# https://gitlab.kitware.com/cmake/cmake/-/issues/23054
|
||||
|
||||
set(PCI_IDS_FILE pci.ids)
|
||||
set(PCI_IDS_URL https://pci-ids.ucw.cz/v2.2/${PCI_IDS_FILE})
|
||||
set(PCI_IDS_INSTALL_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${PCI_IDS_FILE})
|
||||
set(PCI_IDS_URL "https://pci-ids.ucw.cz/v2.2/${PCI_IDS_FILE}")
|
||||
set(PCI_IDS_DOWNLOAD_PATH "${SERENITY_CACHE_DIR}/${PCI_IDS_FILE}")
|
||||
set(PCI_IDS_INSTALL_PATH "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PCI_IDS_FILE}")
|
||||
|
||||
if(ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS ${CMAKE_STAGING_PREFIX}/${PCI_IDS_INSTALL_PATH} )
|
||||
download_file("${PCI_IDS_URL}" "${CMAKE_STAGING_PREFIX}/${PCI_IDS_INSTALL_PATH}")
|
||||
if (ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS "${PCI_IDS_INSTALL_PATH}")
|
||||
download_file("${PCI_IDS_URL}" "${PCI_IDS_DOWNLOAD_PATH}")
|
||||
file(COPY_FILE "${PCI_IDS_DOWNLOAD_PATH}" "${PCI_IDS_INSTALL_PATH}")
|
||||
endif()
|
||||
|
||||
set(USB_IDS_FILE usb.ids)
|
||||
set(USB_IDS_URL http://www.linux-usb.org/${USB_IDS_FILE})
|
||||
set(USB_IDS_INSTALL_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${USB_IDS_FILE})
|
||||
set(USB_IDS_URL "http://www.linux-usb.org/${USB_IDS_FILE}")
|
||||
set(USB_IDS_DOWNLOAD_PATH "${SERENITY_CACHE_DIR}/${USB_IDS_FILE}")
|
||||
set(USB_IDS_INSTALL_PATH "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${USB_IDS_FILE}")
|
||||
|
||||
if(ENABLE_USB_IDS_DOWNLOAD AND NOT EXISTS "${CMAKE_STAGING_PREFIX}/${USB_IDS_INSTALL_PATH}")
|
||||
download_file("${USB_IDS_URL}" "${CMAKE_STAGING_PREFIX}/${USB_IDS_INSTALL_PATH}")
|
||||
if (ENABLE_USB_IDS_DOWNLOAD AND NOT EXISTS "${USB_IDS_INSTALL_PATH}")
|
||||
download_file("${USB_IDS_URL}" "${USB_IDS_DOWNLOAD_PATH}")
|
||||
file(COPY_FILE "${USB_IDS_DOWNLOAD_PATH}" "${USB_IDS_INSTALL_PATH}")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue