myx/MyxCMake/lib/Uninstall.cmake
2022-10-06 16:17:18 +03:00

14 lines
760 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#[=======================================================================[.rst:
Цель для удаления файлов, установленных выполнением цели `install`.
Если при установке использовалась переменная `DESTDIR`, то при удалении
файлов нужно указать то же значение.
#]=======================================================================]
include_guard(GLOBAL)
if(NOT TARGET uninstall)
configure_file(${CMAKE_CURRENT_LIST_DIR}/uninstall.cmake.in
${CMAKE_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY)
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake)
endif()