From b083a6cc0f3da9f729a9ea5be74222a20bb45e25 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 13 Feb 2019 02:04:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D1=85=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=BE=D0=B2=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=B4=D0=B5=D0=B8=D0=BD=D1=81=D1=82=D0=B0=D0=BB=D0=BB=D1=8F?= =?UTF-8?q?=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibUninstall.cmake.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMLibUninstall.cmake.in b/CMLibUninstall.cmake.in index 26b8439..0f747a1 100644 --- a/CMLibUninstall.cmake.in +++ b/CMLibUninstall.cmake.in @@ -20,3 +20,12 @@ foreach(file ${files}) endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") endforeach(file) +# Удаление пустых каталогов +foreach(_file ${files}) + set(_res 0) + while(_res EQUAL 0) + get_filename_component(_file ${_file} DIRECTORY) + execute_process(COMMAND rmdir ${_file} RESULT_VARIABLE _res OUTPUT_QUIET ERROR_QUIET) + endwhile() +endforeach() +