Add uninstall target in cmake

This commit is contained in:
dota17
2020-02-27 16:00:09 +08:00
parent 30e00cf757
commit 1160c8625c
2 changed files with 12 additions and 1 deletions

View File

@@ -335,6 +335,12 @@ else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation") message("Doxygen need to be installed to generate the doxygen documentation")
endif(DOXYGEN_FOUND) endif(DOXYGEN_FOUND)
# uninstall
add_custom_target(uninstall
COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm -rf
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
# XXX for a normal full distribution we'll need to figure out # XXX for a normal full distribution we'll need to figure out
# XXX how to build both shared and static libraries. # XXX how to build both shared and static libraries.
# Probably leverage that to build a local VALGRIND=1 library for testing too. # Probably leverage that to build a local VALGRIND=1 library for testing too.

View File

@@ -230,7 +230,7 @@ JSONC_TEST_TRACE=1 make test
``` ```
and check the log files again. and check the log files again.
To get doxygen documentation To get doxygen documentation:
The libray documentation can be generated directly from the source codes using Doxygen tool: The libray documentation can be generated directly from the source codes using Doxygen tool:
@@ -239,6 +239,11 @@ make doc
google-chrome ../doc/html/index.html google-chrome ../doc/html/index.html
``` ```
To uninstall:
```sh
make uninstall
```
Linking to `libjson-c` <a name="linking"> Linking to `libjson-c` <a name="linking">
---------------------- ----------------------