2022-01-17 18:53:17 -05:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
|
|
|
|
|
2023-11-07 19:23:15 -05:00
|
|
|
set(PNP_IDS_URL https://uefi.org/uefi-pnp-export)
|
|
|
|
set(PNP_IDS_EXPORT_PATH ${SERENITY_CACHE_DIR}/pnp_ids.csv)
|
2022-01-17 18:53:17 -05:00
|
|
|
|
2022-01-25 22:10:48 -05:00
|
|
|
if (ENABLE_PNP_IDS_DOWNLOAD)
|
2022-01-25 18:44:39 -05:00
|
|
|
download_file("${PNP_IDS_URL}" "${PNP_IDS_EXPORT_PATH}")
|
2022-01-17 18:53:17 -05:00
|
|
|
|
2022-01-25 21:51:08 -05:00
|
|
|
set(PNP_IDS_HEADER PnpIDs.h)
|
|
|
|
set(PNP_IDS_IMPLEMENTATION PnpIDs.cpp)
|
2022-01-17 18:53:17 -05:00
|
|
|
|
|
|
|
invoke_generator(
|
|
|
|
"PnpIDsData"
|
|
|
|
Lagom::GeneratePnpIDsData
|
|
|
|
"${PNP_IDS_EXPORT_PATH}"
|
|
|
|
"${PNP_IDS_HEADER}"
|
|
|
|
"${PNP_IDS_IMPLEMENTATION}"
|
|
|
|
arguments -p "${PNP_IDS_EXPORT_PATH}"
|
|
|
|
)
|
|
|
|
|
|
|
|
set(PNP_IDS_SOURCES
|
|
|
|
${PNP_IDS_HEADER}
|
|
|
|
${PNP_IDS_IMPLEMENTATION}
|
|
|
|
)
|
|
|
|
endif()
|