Skip to content

Commit

Permalink
Added uninstall target for Unix platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 3, 2010
1 parent a40d3e1 commit 8ce71e5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions extras/uninstall.sh
@@ -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

0 comments on commit 8ce71e5

Please sign in to comment.