Added uninstall target for Unix platforms.

This commit is contained in:
Ryan C. Gordon 2010-02-02 23:22:49 -05:00
parent a40d3e1e3b
commit 8ce71e5924
2 changed files with 21 additions and 1 deletions

View File

@ -521,7 +521,17 @@ ELSE(DOXYGEN_FOUND)
ENDIF(DOXYGEN_FOUND)
IF(UNIX)
ADD_CUSTOM_TARGET(dist ./extras/makedist.sh ${PHYSFS_VERSION} COMMENT "Building source tarball")
ADD_CUSTOM_TARGET(
dist
./extras/makedist.sh ${PHYSFS_VERSION}
COMMENT "Building source tarball..."
)
ADD_CUSTOM_TARGET(
uninstall
"${CMAKE_CURRENT_SOURCE_DIR}/extras/uninstall.sh"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Uninstall the project..."
)
ENDIF(UNIX)
MACRO(MESSAGE_BOOL_OPTION _NAME _VALUE)

10
extras/uninstall.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
if [ ! -f "./install_manifest.txt" ]; then
echo "ERROR: This needs to be run from your CMake build directory after installing." 1>&2
exit 1
fi
xargs rm -vf < install_manifest.txt
exit 0