diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-25 13:39:43 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-25 13:39:43 +0800 |
commit | 71e9f4c0e5fc29a8bb74bc313eed05190da7bf96 (patch) | |
tree | 37b5f5d456803a5d3bdd1bf153e05682d56a7961 /indra/cmake/Prebuilt.cmake | |
parent | c8d2da56c509d366493b667020bddd13538b772f (diff) |
Make Prebuilt.cmake reimplementation more generic
Anticipate the possibility that an archive isn't suffixed with a 64.
Parentheses need to be escaped by quotes (backslashing would work too),
otherwise they would be parsed as part of CMake commands syntax.
Regex subexpressions shouldn't contain regex themselves (only verbatim
or preprocessed strings are used within the parentheses).
Diffstat (limited to 'indra/cmake/Prebuilt.cmake')
-rw-r--r-- | indra/cmake/Prebuilt.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 793da3338f..012dea5a50 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -55,13 +55,13 @@ macro (use_prebuilt_binary _binary) endif (${system_name} MATCHES freebsd) execute_process(COMMAND xmllint --xpath - "//map/map/map/map/map/map/string[contains(text(),'${_binary}')][contains(text(),'${system_name}64')]/text()" autobuild.xml + "//map/map/map/map/map/map/string[contains(text(),'${_binary}')][contains(text(),'${system_name}')]/text()" autobuild.xml WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/.. OUTPUT_VARIABLE package_url OUTPUT_STRIP_TRAILING_WHITESPACE ) endif ("${package_url}" STREQUAL "") - string(REGEX REPLACE ^https://github.com/secondlife/3p-${_binary}/releases/download/v[0-9]+.*/ "" package_name ${package_url}) + string(REGEX REPLACE "^https://(megapahit.net/downloads|github.com/secondlife/3p-${_binary}/releases/download|automated-builds-secondlife-com.s3.amazonaws.com/ct2).*/" "" package_name ${package_url}) file(DOWNLOAD ${package_url} ${CMAKE_BINARY_DIR}/${package_name} |