Skip to content

Commit

Permalink
Merge pull request #2 from pedrolcl/fix-clean-cmake-issue
Browse files Browse the repository at this point in the history
Fix: cmake clean issue (lib.rs.cc not found after cleaning the build directory)
  • Loading branch information
paandahl committed Jan 16, 2023
2 parents 9e6d0b5 + fc85ada commit 6f1fe20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@ add_custom_command(
COMMAND cargo build --manifest-path ${CARGO_MANIFEST}
DEPENDS ${BLOBSTORE_SOURCE_FILE}
USES_TERMINAL
COMMENT "Running cargo..."
)

add_executable(cpp_with_rust src/main.cpp src/multibuf.cpp ${BLOBSTORE_BRIDGE_CPP})
Expand All @@ -29,6 +30,11 @@ target_include_directories(

target_link_libraries(cpp_with_rust ${BLOBSTORE_LIB})

set_target_properties(
cpp_with_rust
PROPERTIES ADDITIONAL_CLEAN_FILES ${CARGO_TARGET_DIR}
)

# Windows-only configuration
if(WIN32)
target_link_libraries(cpp_with_rust userenv ws2_32 bcrypt)
Expand Down

0 comments on commit 6f1fe20

Please sign in to comment.