Use corrosion instead of CMakeRust (#3273)
* Use corrosion instead of CMakeRust * use OpenSUSE tumbleweed (latest) to get newer CMake
This commit is contained in:
committed by
GitHub
parent
8dd29e0a8a
commit
18a8bd2997
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user