mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 10:07:19 +02:00
Use corrosion instead of CMakeRust (#3273)
* Use corrosion instead of CMakeRust * use OpenSUSE tumbleweed (latest) to get newer CMake
This commit is contained in:
parent
8dd29e0a8a
commit
18a8bd2997
47 changed files with 48 additions and 2786 deletions
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required (VERSION 3.0)
|
||||
cmake_minimum_required (VERSION 3.22)
|
||||
include_directories (${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/tc
|
||||
|
@ -52,9 +52,9 @@ add_executable (lex_executable lex.cpp)
|
|||
|
||||
# Yes, 'task' (and hence libshared) is included twice, otherwise linking fails on assorted OSes.
|
||||
# Similarly for `tc`.
|
||||
target_link_libraries (task_executable task tc tc-rust commands tc columns libshared task libshared ${TASK_LIBRARIES})
|
||||
target_link_libraries (calc_executable task tc tc-rust commands tc columns libshared task libshared ${TASK_LIBRARIES})
|
||||
target_link_libraries (lex_executable task tc tc-rust commands tc columns libshared task libshared ${TASK_LIBRARIES})
|
||||
target_link_libraries (task_executable task tc commands tc columns libshared task libshared ${TASK_LIBRARIES})
|
||||
target_link_libraries (calc_executable task tc commands tc columns libshared task libshared ${TASK_LIBRARIES})
|
||||
target_link_libraries (lex_executable task tc commands tc columns libshared task libshared ${TASK_LIBRARIES})
|
||||
if (DARWIN)
|
||||
# SystemConfiguration is required by Rust libraries like reqwest, to get proxy configuration.
|
||||
target_link_libraries (task_executable "-framework CoreFoundation -framework Security -framework SystemConfiguration")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required (VERSION 3.0)
|
||||
cmake_minimum_required (VERSION 3.22)
|
||||
include_directories (${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/tc
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required (VERSION 3.0)
|
||||
cmake_minimum_required (VERSION 3.22)
|
||||
include_directories (${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/tc
|
||||
|
|
1
src/tc/.gitignore
vendored
Normal file
1
src/tc/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
libtaskchampion_lib.a
|
|
@ -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)
|
||||
|
|
4
src/tc/rust/.gitignore
vendored
4
src/tc/rust/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
|||
target
|
||||
x86_64-unknown-linux-gnu
|
||||
aarch64-apple-darwin
|
||||
.rustc_info.json
|
|
@ -1 +0,0 @@
|
|||
cargo_build(NAME tc-rust)
|
2068
src/tc/rust/Cargo.lock
generated
2068
src/tc/rust/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,10 +0,0 @@
|
|||
[package]
|
||||
name = "tc-rust"
|
||||
version = "0.1.0"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
taskchampion = { path = "../../../taskchampion/taskchampion", features = ["server-gcp", "server-sync"] }
|
||||
taskchampion-lib = { path = "../../../taskchampion/lib" }
|
|
@ -1,2 +0,0 @@
|
|||
extern crate taskchampion_lib;
|
||||
pub use taskchampion_lib::*;
|
Loading…
Add table
Add a link
Reference in a new issue