mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-27 05:45:58 +00:00
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
This commit is contained in:
@@ -1,21 +1,31 @@
|
||||
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(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
# Copyright (C) 2009-2026 Robin Stuart <rstuart114@gmail.com>
|
||||
# vim: set ts=4 sw=4 et :
|
||||
|
||||
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||
FOREACH(file ${files})
|
||||
MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
# IF(EXISTS "$ENV{DESTDIR}${file}")
|
||||
EXEC_PROGRAM(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
IF(NOT "${rm_retval}" STREQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
ENDIF(NOT "${rm_retval}" STREQUAL 0)
|
||||
# ELSE(EXISTS "$ENV{DESTDIR}${file}")
|
||||
# MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
# ENDIF(EXISTS "$ENV{DESTDIR}${file}")
|
||||
ENDFOREACH(file)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user