From e9d48b020d986eb97fb0c00d87bc7bf8a9c10ffa Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Tue, 14 Apr 2026 20:49:24 +0800 Subject: feat: add uninstall target to CMake build configuration --- ricochet/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ricochet/CMakeLists.txt') diff --git a/ricochet/CMakeLists.txt b/ricochet/CMakeLists.txt index 560341c..c2150b8 100644 --- a/ricochet/CMakeLists.txt +++ b/ricochet/CMakeLists.txt @@ -34,4 +34,14 @@ install(TARGETS ricochet RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib -) \ No newline at end of file +) + +if(NOT TARGET uninstall) + configure_file( + "${PROJECT_SOURCE_DIR}/etc/cmake_uninstall.cmake.in" + "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake") +endif() \ No newline at end of file -- cgit v1.2.3