File: ManageUninstall.cmake

package info (click to toggle)
ibus-table-chinese 1.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 29,812 kB
  • sloc: sh: 106; makefile: 11
file content (28 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# - Uninstall target.
# Use this module to provide uninstall target.
#
# Define following targets
#   uninstall: For uninstalling the package.
#

IF(NOT DEFINED _MANAGE_UNINSTALL_CMAKE_)
    SET(_MANAGE_UNINSTALL_CMAKE_ "DEFINED")
    SET(CMAKE_UNINSTALL_IN_SEARCH_PATH ${CMAKE_MODULE_PATH} ${CMAKE_ROOT}/Modules ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/Modules)
    FIND_FILE(CMAKE_UNINSTALL_IN cmake_uninstall.cmake.in
	PATHS ${CMAKE_UNINSTALL_IN_SEARCH_PATH})

    # MESSAGE("CMAKE_UNINSTALL_IN=${CMAKE_UNINSTALL_IN}")
    IF(CMAKE_UNINSTALL_IN STREQUAL "CMAKE_UNINSTALL_IN-NOTFOUND")
	MESSAGE(FATAL_ERROR "Cannot find cmake_uninstall.cmake.in in"
	    "${CMAKE_UNINSTALL_IN_SEARCH_PATH}")
    ENDIF(CMAKE_UNINSTALL_IN STREQUAL "CMAKE_UNINSTALL_IN-NOTFOUND")

    CONFIGURE_FILE("${CMAKE_UNINSTALL_IN}"
	"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
	IMMEDIATE @ONLY)

    ADD_CUSTOM_TARGET(uninstall
	"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
	)
ENDIF(NOT DEFINED _MANAGE_UNINSTALL_CMAKE_)