Meta: Correct the PNP ID download condition

`PNP_IDS_PATH` does not exist, set this to `PNP_IDS_EXPORT_PATH` to
avoid redownloading the database every reconfigure.
This commit is contained in:
Ali Mohammad Pur 2022-01-25 00:56:11 +03:30 committed by Ali Mohammad Pur
parent aa20210119
commit 98183ef572
Notes: sideshowbarker 2024-07-17 20:13:45 +09:00

View file

@ -5,7 +5,7 @@ set(PNP_IDS_URL http://www.uefi.org/uefi-pnp-export)
set(PNP_IDS_EXPORT_PATH ${CMAKE_BINARY_DIR}/pnp.ids.html)
set(PNP_IDS_INSTALL_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${PNP_IDS_FILE})
if(ENABLE_PNP_IDS_DOWNLOAD AND NOT EXISTS ${PNP_IDS_PATH})
if(ENABLE_PNP_IDS_DOWNLOAD AND NOT EXISTS ${PNP_IDS_EXPORT_PATH})
message(STATUS "Downloading PNP ID database from ${PNP_IDS_URL}...")
file(MAKE_DIRECTORY ${CMAKE_INSTALL_DATAROOTDIR})
file(DOWNLOAD ${PNP_IDS_URL} ${PNP_IDS_EXPORT_PATH} INACTIVITY_TIMEOUT 10)