Удаление пустых каталогов при деинсталляции

This commit is contained in:
Andrei Astafev 2019-02-13 02:04:57 +03:00
parent 5e05a214bd
commit b083a6cc0f

View File

@ -20,3 +20,12 @@ foreach(file ${files})
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(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()