Use corrosion instead of CMakeRust (#3273)

* Use corrosion instead of CMakeRust
* use OpenSUSE tumbleweed (latest) to get newer CMake
This commit is contained in:
Dustin J. Mitchell
2024-03-02 16:21:34 -05:00
committed by GitHub
parent 8dd29e0a8a
commit 18a8bd2997
47 changed files with 48 additions and 2786 deletions

View File

@@ -1,4 +1,18 @@
cmake_minimum_required (VERSION 3.0)
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)
# Import taskchampion-lib as a CMake library.
corrosion_import_crate(
MANIFEST_PATH "${CMAKE_SOURCE_DIR}/Cargo.toml"
LOCKED
CRATES "taskchampion-lib")
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/tc
@@ -15,3 +29,4 @@ set (tc_SRCS
Task.cpp Task.h)
add_library (tc STATIC ${tc_SRCS})
target_link_libraries(tc taskchampion-lib)