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})
	message(STATUS "Uninstalling: ${FILE}")
	if(EXISTS "${FILE}")
		file(REMOVE ${FILE})
	elseif(IS_SYMLINK "${FILE}")
		file(REMOVE ${FILE})
	else()
		message(STATUS "File \"${FILE}\" does not exist.")
	endif()
endforeach()
