From fd306712b85dda3ea89de4e617aebeb98b2ede80 Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Sun, 7 Apr 2024 12:10:54 -0400 Subject: [PATCH] Install corrosion as submodule. (#3348) This will enable nixpkgs -- and any other distribution that builds in a network sandbox and/or wants to use their own corrosion package rather than building another one -- to do so without patching taskwarrior. Since we're already using submodules for libshared I don't think this should make the build process any more complicated for anyone else. See https://github.com/NixOS/nixpkgs/issues/300679#issuecomment-2041252688 for context. --- .gitmodules | 3 +++ src/tc/CMakeLists.txt | 7 +------ src/tc/corrosion | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) create mode 160000 src/tc/corrosion diff --git a/.gitmodules b/.gitmodules index fed3de512..cddc791b0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "src/libshared"] path = src/libshared url = https://github.com/GothenburgBitFactory/libshared.git +[submodule "src/tc/corrosion"] + path = src/tc/corrosion + url = https://github.com/corrosion-rs/corrosion.git diff --git a/src/tc/CMakeLists.txt b/src/tc/CMakeLists.txt index 500ad1727..165af059c 100644 --- a/src/tc/CMakeLists.txt +++ b/src/tc/CMakeLists.txt @@ -1,11 +1,6 @@ cmake_minimum_required (VERSION 3.22) -FetchContent_Declare ( - Corrosion - GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git - GIT_TAG v0.4.7 -) -FetchContent_MakeAvailable(Corrosion) +add_subdirectory(${CMAKE_SOURCE_DIR}/src/tc/corrosion) # Import taskchampion-lib as a CMake library. corrosion_import_crate( diff --git a/src/tc/corrosion b/src/tc/corrosion new file mode 160000 index 000000000..8ddd6d56c --- /dev/null +++ b/src/tc/corrosion @@ -0,0 +1 @@ +Subproject commit 8ddd6d56ca597cb855f532e9ba4c7bc1cbe0803b