1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-20 02:16:11 +00:00
Files
zint/cmake_uninstall.cmake.in
gitlost eea16e1a89 DOTCODE: fix not emitting FNC1 (signalling non-GS1) when input
just 2 digits
cmake: set `rpath` of CLI frontend on macOS install (ticket #346,
  props Hagen Röwer)
cmake: make uninstall: update to use `-E rm` if available, warn
  rather than fatal error if fail to remove, note if leaving
  "/zint" directory unremoved (i.e. "lib/cmake/zint")
library: de-duplicate errtxt no.
test suite: update BWIPP to latest
test suite: test_bwipp: enable & fix dotcode random test
test suite: fuzz: gen_corpora fuzz_data 1st -> 2nd
2026-01-18 19:14:10 +00:00

32 lines
1.3 KiB
CMake

# Copyright (C) 2009-2026 Robin Stuart <rstuart114@gmail.com>
# vim: set ts=4 sw=4 et :
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif()
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
if(file MATCHES "(^.*/zint/)[^/]+$")
list(FIND dirs ${CMAKE_MATCH_1} fnd_dir)
if (fnd_dir EQUAL -1)
list(APPEND dirs ${CMAKE_MATCH_1})
endif()
endif()
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17")
execute_process(COMMAND "@CMAKE_COMMAND@" "-E" "rm" "--" "$ENV{DESTDIR}${file}" RESULT_VARIABLE rm_res)
else()
execute_process(COMMAND "@CMAKE_COMMAND@" "-E" "remove" "$ENV{DESTDIR}${file}" RESULT_VARIABLE rm_res)
endif()
if(rm_res)
message(WARNING "Failed to remove \"$ENV{DESTDIR}${file}\"")
endif()
endforeach(file)
foreach(dir ${dirs})
if (EXISTS "$ENV{DESTDIR}${dir}" AND IS_DIRECTORY "$ENV{DESTDIR}${dir}")
message(STATUS "Note: did not remove directory \"$ENV{DESTDIR}${dir}\"")
endif()
endforeach(dir)