mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 09:55:19 +00:00
[CMake] Declare uninstall rule before the components so that they
can add dependencies to the rule for their own custom uninstall logic.
This commit is contained in:
parent
23ac66ef42
commit
6a2a8e06d7
|
@ -327,6 +327,25 @@ message(STATUS "CMAKE_INSTALL_LIBDIR: \"${CMAKE_INSTALL_LIBDIR}\"")
|
||||||
message(STATUS "CMAKE_INSTALL_BINDIR: \"${CMAKE_INSTALL_BINDIR}\"")
|
message(STATUS "CMAKE_INSTALL_BINDIR: \"${CMAKE_INSTALL_BINDIR}\"")
|
||||||
message(STATUS "CMAKE_INSTALL_INCLUDEDIR: \"${CMAKE_INSTALL_INCLUDEDIR}\"")
|
message(STATUS "CMAKE_INSTALL_INCLUDEDIR: \"${CMAKE_INSTALL_INCLUDEDIR}\"")
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Uninstall rule
|
||||||
|
################################################################################
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
|
# Target needs to be declared before the components so that they can add
|
||||||
|
# dependencies to this target so they can run their own custom uninstall rules.
|
||||||
|
add_custom_target(uninstall
|
||||||
|
COMMAND
|
||||||
|
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
|
COMMENT "Uninstalling..."
|
||||||
|
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# CMake build file locations
|
# CMake build file locations
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -362,19 +381,3 @@ if (ENABLE_EXAMPLE_TARGETS)
|
||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Uninstall rule
|
|
||||||
################################################################################
|
|
||||||
configure_file(
|
|
||||||
"${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(uninstall
|
|
||||||
COMMAND
|
|
||||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
||||||
COMMENT "Uninstalling..."
|
|
||||||
${ADD_CUSTOM_COMMAND_USES_TERMINAL_ARG}
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in a new issue