mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
25 lines
979 B
CMake
25 lines
979 B
CMake
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
|
|
|
|
if (ENABLE_PUBLIC_SUFFIX_DOWNLOAD)
|
|
set(PUBLIC_SUFFIX_PATH "${SERENITY_CACHE_DIR}/PublicSuffix" CACHE PATH "Download location for PublicSuffix files")
|
|
set(PUBLIC_SUFFIX_DATA_URL "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat")
|
|
set(PUBLIC_SUFFIX_DATA_PATH "${PUBLIC_SUFFIX_PATH}/public_suffix_list.dat")
|
|
|
|
set(PUBLIC_SUFFIX_DATA_HEADER PublicSuffixData.h)
|
|
set(PUBLIC_SUFFIX_DATA_IMPLEMENTATION PublicSuffixData.cpp)
|
|
|
|
download_file("${PUBLIC_SUFFIX_DATA_URL}" "${PUBLIC_SUFFIX_DATA_PATH}")
|
|
invoke_generator(
|
|
"PublicSuffixData"
|
|
Lagom::GeneratePublicSuffixData
|
|
"${PUBLIC_SUFFIX_PATH}/"
|
|
"${PUBLIC_SUFFIX_DATA_HEADER}"
|
|
"${PUBLIC_SUFFIX_DATA_IMPLEMENTATION}"
|
|
arguments -p "${PUBLIC_SUFFIX_DATA_PATH}"
|
|
)
|
|
|
|
set(PUBLIC_SUFFIX_SOURCES
|
|
${PUBLIC_SUFFIX_DATA_HEADER}
|
|
${PUBLIC_SUFFIX_DATA_IMPLEMENTATION}
|
|
)
|
|
endif()
|