forked from alucardthefish/CodeNowHere
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcmake_uninstall.cmake.in
More file actions
21 lines (18 loc) · 819 Bytes
/
cmake_uninstall.cmake.in
File metadata and controls
21 lines (18 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# cmake_uninstall.cmake.in
# Check if the installation prefix exists
if(EXISTS "@CMAKE_INSTALL_PREFIX@")
message(STATUS "Uninstalling files from @CMAKE_INSTALL_PREFIX@")
# Remove installed files and directories
file(REMOVE_RECURSE "@CMAKE_INSTALL_PREFIX@/cnh")
file(REMOVE_RECURSE "@CMAKE_INSTALL_PREFIX@/cnh_templates")
file(REMOVE_RECURSE "@CMAKE_INSTALL_PREFIX@/@CNH_BINARY_DEST@")
# Optionally, remove the installation prefix if it is empty
if(EXISTS "@CMAKE_INSTALL_PREFIX@")
file(GLOB PREFIX_CONTENT "@CMAKE_INSTALL_PREFIX@/*")
if(PREFIX_CONTENT STREQUAL "")
file(REMOVE_RECURSE "@CMAKE_INSTALL_PREFIX@")
endif()
endif()
else()
message(WARNING "Installation prefix '@CMAKE_INSTALL_PREFIX@' does not exist. Nothing to uninstall.")
endif()