Meta: ENABLE_NETWORK_DOWNLOADS for ca_certificates and public_suffix

This commit is contained in:
Davide Cavalca 2024-06-05 09:09:46 -07:00 committed by Tim Flynn
parent f234429392
commit 9af91eb622
Notes: sideshowbarker 2024-07-17 12:02:22 +09:00
2 changed files with 10 additions and 2 deletions

View file

@ -13,7 +13,11 @@ set(CACERT_INSTALL_FILE cacert.pem)
if (ENABLE_CACERT_DOWNLOAD)
remove_path_if_version_changed("${CACERT_VERSION}" "${CACERT_VERSION_FILE}" "${CACERT_PATH}")
download_file("${CACERT_URL}" "${CACERT_PATH}/${CACERT_FILE}" SHA256 "${CACERT_SHA256}")
if (ENABLE_NETWORK_DOWNLOADS)
download_file("${CACERT_URL}" "${CACERT_PATH}/${CACERT_FILE}" SHA256 "${CACERT_SHA256}")
else()
message(STATUS "Skipping download of ${CACERT_URL}, expecting it to have been downloaded to ${CACERT_PATH}")
endif()
if (NOT "${CMAKE_STAGING_PREFIX}" STREQUAL "")
set(CACERT_INSTALL_PATH ${CMAKE_STAGING_PREFIX}/etc/${CACERT_INSTALL_FILE})

View file

@ -8,7 +8,11 @@ if (ENABLE_PUBLIC_SUFFIX_DOWNLOAD)
set(PUBLIC_SUFFIX_DATA_HEADER PublicSuffixData.h)
set(PUBLIC_SUFFIX_DATA_IMPLEMENTATION PublicSuffixData.cpp)
download_file("${PUBLIC_SUFFIX_DATA_URL}" "${PUBLIC_SUFFIX_DATA_PATH}")
if (ENABLE_NETWORK_DOWNLOADS)
download_file("${PUBLIC_SUFFIX_DATA_URL}" "${PUBLIC_SUFFIX_DATA_PATH}")
else()
message(STATUS "Skipping download of ${PUBLIC_SUFFIX_DATA_URL}, expecting it to be in ${PUBLIC_SUFFIX_DATA_PATH}")
endif()
invoke_generator(
"PublicSuffixData"
Lagom::GeneratePublicSuffixData