mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

Needed to readd the broctl/broccoli/binpac submodules manually, as git seemed to get confused by the existing directories.
35 lines
1.1 KiB
CMake
35 lines
1.1 KiB
CMake
function(uninstall_manifest manifestPath)
|
|
file(READ "${manifestPath}" files)
|
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
|
foreach (file ${files})
|
|
set(fileName $ENV{DESTDIR}${file})
|
|
|
|
if (EXISTS "${fileName}" OR IS_SYMLINK "${fileName}")
|
|
message(STATUS "Uninstalling: ${fileName}")
|
|
|
|
execute_process(
|
|
COMMAND @CMAKE_COMMAND@ -E remove "${fileName}"
|
|
OUTPUT_VARIABLE rm_out
|
|
RESULT_VARIABLE rm_retval
|
|
)
|
|
|
|
if (NOT ${rm_retval} EQUAL 0)
|
|
message(FATAL_ERROR "Problem when removing: ${fileName}")
|
|
endif ()
|
|
else ()
|
|
message(STATUS "Does not exist: ${fileName}")
|
|
endif ()
|
|
|
|
endforeach ()
|
|
endfunction(uninstall_manifest)
|
|
|
|
file(GLOB install_manifests @CMAKE_CURRENT_BINARY_DIR@/install_manifest*.txt)
|
|
|
|
if (install_manifests)
|
|
foreach (manifest ${install_manifests})
|
|
uninstall_manifest(${manifest})
|
|
endforeach ()
|
|
else ()
|
|
message(FATAL_ERROR "Cannot find any install manifests in: "
|
|
"\"@CMAKE_CURRENT_BINARY_DIR@/install_manifest*.txt\"")
|
|
endif ()
|