Skip to content

Commit

Permalink
more conventional installation, with instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
admorris committed Feb 1, 2018
1 parent a5c2e5a commit 60dbaa8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ endforeach()

# Configure install destination
install(TARGETS cropsimpletools ${EXELIST}
RUNTIME DESTINATION ${SMPT_SOURCE_DIR}/bin
LIBRARY DESTINATION ${SMPT_SOURCE_DIR}/lib
ARCHIVE DESTINATION ${SMPT_SOURCE_DIR}/lib/static)
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/static)

# Provide easy (but dumb) way to uninstall
add_custom_target(uninstall xargs rm -v < install_manifest.txt)

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,28 @@ The most recent version of simpletools, including the above documentation will a

Bug reports, feature requests, comments and patches are always welcome. \
[email protected]

## Installation

Building and installing are done with CMake.
If you want to install simpletools system-wide, run:

cmake .
make
sudo make install

If you don't have administrator privileges and/or want to install locally, use `-DCMAKE_INSTALL_PREFIX` to change the destination, *e.g.*:

cmake . -DCMAKE_INSTALL_PREFIX=~/.local/
make
make install

### Uninstallation

After running `make install`, a file called `install_manifest.txt` will be created, which lists the destinations of all installed binaries and libraries.
To uninstall, you can run:

make uninstall

which will delete every file listed in `install_manifest.txt`.

0 comments on commit 60dbaa8

Please sign in to comment.