Meta: Install PCI and USB ID files directly into /res

The install() command used by 1e36d54493
installs the provided file into the *directory* named by the DESTINATION
parameter. So if we ask it to install pci.ids to /res/pci.ids, the final
destination will be /res/pci.ids/pci.ids.
This commit is contained in:
Timothy Flynn 2023-03-31 15:00:41 -04:00 committed by Tim Flynn
parent ad31265e60
commit 593a4a4232
Notes: sideshowbarker 2024-07-17 04:03:27 +09:00

View file

@ -248,9 +248,9 @@ export_components("${CMAKE_BINARY_DIR}/components.ini")
set(PCI_IDS_FILE pci.ids)
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}")
set(PCI_IDS_INSTALL_PATH "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
if (ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS "${PCI_IDS_INSTALL_PATH}")
if (ENABLE_PCI_IDS_DOWNLOAD AND NOT EXISTS "${PCI_IDS_INSTALL_PATH}/${PCI_IDS_FILE}")
download_file("${PCI_IDS_URL}" "${PCI_IDS_DOWNLOAD_PATH}")
install(FILES "${PCI_IDS_DOWNLOAD_PATH}" DESTINATION "${PCI_IDS_INSTALL_PATH}")
endif()
@ -258,9 +258,9 @@ endif()
set(USB_IDS_FILE usb.ids)
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}")
set(USB_IDS_INSTALL_PATH "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
if (ENABLE_USB_IDS_DOWNLOAD AND NOT EXISTS "${USB_IDS_INSTALL_PATH}")
if (ENABLE_USB_IDS_DOWNLOAD AND NOT EXISTS "${USB_IDS_INSTALL_PATH}/${USB_IDS_FILE}")
download_file("${USB_IDS_URL}" "${USB_IDS_DOWNLOAD_PATH}")
install(FILES "${USB_IDS_DOWNLOAD_PATH}" DESTINATION "${USB_IDS_INSTALL_PATH}")
endif()