From 1621b3dbfaccb4e2960adba4daf81c967e5cdf9e 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 --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 560341c..c2150b8 100644 --- a/CMakeLists.txt +++ b/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