From 593a4a42320dbeee11d678ea5cef51db532453a0 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 31 Mar 2023 15:00:41 -0400 Subject: [PATCH] Meta: Install PCI and USB ID files directly into /res The install() command used by 1e36d5449304226b097a4929a90f846c0ddf1d76 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. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66bb460c9a5..8758813eebb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()