mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
f657362fda
This check isn't needed because download_file() will check if it exists already before doing the download. Worse, it would prevent the generator target from being defined if the file existed, which then made CMake not realize the generated files were important and delete them.
30 lines
873 B
CMake
30 lines
873 B
CMake
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
|
|
|
|
set(PNP_IDS_FILE pnp.ids)
|
|
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)
|
|
file(MAKE_DIRECTORY ${CMAKE_INSTALL_DATAROOTDIR})
|
|
download_file("${PNP_IDS_URL}" "${PNP_IDS_EXPORT_PATH}")
|
|
|
|
set(PNP_IDS_HEADER PnpIDs.h)
|
|
set(PNP_IDS_IMPLEMENTATION PnpIDs.cpp)
|
|
set(PNP_IDS_TARGET_PREFIX "")
|
|
|
|
invoke_generator(
|
|
"PnpIDsData"
|
|
Lagom::GeneratePnpIDsData
|
|
"${PNP_IDS_EXPORT_PATH}"
|
|
"${PNP_IDS_TARGET_PREFIX}"
|
|
"${PNP_IDS_HEADER}"
|
|
"${PNP_IDS_IMPLEMENTATION}"
|
|
arguments -p "${PNP_IDS_EXPORT_PATH}"
|
|
)
|
|
|
|
set(PNP_IDS_SOURCES
|
|
${PNP_IDS_HEADER}
|
|
${PNP_IDS_IMPLEMENTATION}
|
|
)
|
|
endif()
|