From e70d0baf5fb3dce48d6cce5ff782a7efbf297df0 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 27 Apr 2024 10:05:00 +0100 Subject: [PATCH] Add URL variables for Rust dependencies --- CMakeLists.txt | 18 +++++++++++++++--- README.md | 3 +++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ed23abd..805d22a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,9 +67,13 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") find_package(TBB REQUIRED) endif() +if(NOT DEFINED ESPLUGIN_URL) + set(ESPLUGIN_URL "https://github.com/Ortham/esplugin/archive/4.1.1.tar.gz") +endif() + ExternalProject_Add(esplugin PREFIX "external" - URL "https://github.com/Ortham/esplugin/archive/4.1.1.tar.gz" + URL ${ESPLUGIN_URL} URL_HASH "SHA256=4c61199fc85ae7ebd8a3954c95e99598b4052ee923567d24f95d7a334c2c6525" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 @@ -86,9 +90,13 @@ else() set(ESPLUGIN_LIBRARIES ${ESPLUGIN_LIBRARIES} dl) endif() +if(NOT DEFINED LIBLOADORDER_URL) + set(LIBLOADORDER_URL "https://github.com/Ortham/libloadorder/archive/15.0.2.tar.gz") +endif() + ExternalProject_Add(libloadorder PREFIX "external" - URL "https://github.com/Ortham/libloadorder/archive/15.0.2.tar.gz" + URL ${LIBLOADORDER_URL} URL_HASH "SHA256=7048984da19f6e1e6a271b0b396fc5a47ae3c25ff715995c885dc8a7a9bbc5d6" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 @@ -105,9 +113,13 @@ else() set(LIBLOADORDER_LIBRARIES ${LIBLOADORDER_LIBRARIES} dl) endif() +if(NOT DEFINED LOOT_CONDITION_INTERPRETER_URL) + set(LOOT_CONDITION_INTERPRETER_URL "https://github.com/loot/loot-condition-interpreter/archive/3.1.0.tar.gz") +endif() + ExternalProject_Add(loot-condition-interpreter PREFIX "external" - URL "https://github.com/loot/loot-condition-interpreter/archive/3.1.0.tar.gz" + URL ${LOOT_CONDITION_INTERPRETER_URL} URL_HASH "SHA256=a2dcadff0e6f9fd4fdc12785d296bf5ee24cc556f4b20a357233e2a2e79d025c" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 diff --git a/README.md b/README.md index 221568b1..2564dd64 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,9 @@ Parameter | Values | Default |Description `BUILD_SHARED_LIBS` | `ON`, `OFF` | `ON` | Whether or not to build a shared libloot binary. `LIBLOOT_BUILD_TESTS` | `ON`, `OFF` | `ON` | Whether or not to build libloot's tests. `RUN_CLANG_TIDY` | `ON`, `OFF` | `OFF` | Whether or not to run clang-tidy during build. Has no effect when using CMake's MSVC generator. +`ESPLUGIN_URL` | A URL | A GitHub release archive URL | The URL to get a source code archive from. This can be used to supply a local path if the archive has already been downloaded (e.g. for offline builds). +`LIBLOADORDER_URL` | A URL | A GitHub release archive URL | The URL to get a source code archive from. This can be used to supply a local path if the archive has already been downloaded (e.g. for offline builds). +`LOOT_CONDITION_INTERPRETER_URL` | A URL | A GitHub release archive URL | The URL to get a source code archive from. This can be used to supply a local path if the archive has already been downloaded (e.g. for offline builds). You may also need to set `BOOST_ROOT` if CMake cannot find Boost.