2023-09-07 11:15:53 +02:00
|
|
|
################################################################################
|
|
|
|
|
# #
|
|
|
|
|
# This file is part of IfcOpenShell. #
|
|
|
|
|
# #
|
|
|
|
|
# IfcOpenShell is free software: you can redistribute it and/or modify #
|
|
|
|
|
# it under the terms of the Lesser GNU General Public License as published by #
|
|
|
|
|
# the Free Software Foundation, either version 3.0 of the License, or #
|
|
|
|
|
# (at your option) any later version. #
|
|
|
|
|
# #
|
|
|
|
|
# IfcOpenShell is distributed in the hope that it will be useful, #
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
|
|
|
# Lesser GNU General Public License for more details. #
|
|
|
|
|
# #
|
|
|
|
|
# You should have received a copy of the Lesser GNU General Public License #
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
|
|
|
# #
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
|
|
|
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
|
|
|
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
|
|
|
|
|
|
|
|
|
foreach(file ${files})
|
2026-01-26 15:52:03 +05:00
|
|
|
set(filepath "$ENV{DESTDIR}${file}")
|
|
|
|
|
message(STATUS "Uninstalling ${filepath}")
|
2023-09-07 11:15:53 +02:00
|
|
|
|
2026-01-26 15:52:03 +05:00
|
|
|
if(IS_SYMLINK "${filepath}" OR EXISTS "${filepath}")
|
2026-01-26 16:01:24 +05:00
|
|
|
file(REMOVE "${filepath}")
|
2026-01-26 16:02:30 +05:00
|
|
|
else(NOT EXISTS "${filepath}")
|
2026-01-26 15:52:03 +05:00
|
|
|
message(STATUS "File ${filepath} does not exist.")
|
2023-09-07 11:15:53 +02:00
|
|
|
endif()
|
|
|
|
|
endforeach()
|