2022-01-17 23:53:17 +00:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
|
|
|
|
|
|
|
|
set(PNP_IDS_URL http://www.uefi.org/uefi-pnp-export)
|
2022-01-26 03:13:22 +00:00
|
|
|
set(PNP_IDS_EXPORT_PATH ${CMAKE_BINARY_DIR}/pnp_ids.html)
|
2022-01-17 23:53:17 +00:00
|
|
|
|
2022-01-26 03:10:48 +00:00
|
|
|
if (ENABLE_PNP_IDS_DOWNLOAD)
|
2022-01-25 23:44:39 +00:00
|
|
|
download_file("${PNP_IDS_URL}" "${PNP_IDS_EXPORT_PATH}")
|
2022-01-17 23:53:17 +00:00
|
|
|
|
2022-01-26 02:51:08 +00:00
|
|
|
set(PNP_IDS_HEADER PnpIDs.h)
|
|
|
|
set(PNP_IDS_IMPLEMENTATION PnpIDs.cpp)
|
2022-01-17 23:53:17 +00: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()
|