diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2021-07-25 15:11:11 +0000 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2021-07-25 15:11:11 +0000 |
commit | 8c727e5ce13b288d982471120b19c037a1cb9624 (patch) | |
tree | deee6b354a62fb0e285ce66bf3ee7000e8eb3dac | |
parent | be9671e48a8f5abbe9dc7f118f025d8638727a7e (diff) | |
download | json-c-8c727e5ce13b288d982471120b19c037a1cb9624.tar.gz |
Only define an "uninstall" target if it's not already defined (e.g. by projects that include json-c)
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 01d37f8..ed7bc03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,10 +436,12 @@ include_directories(${PROJECT_BINARY_DIR}) add_subdirectory(doc) # uninstall -add_custom_target(uninstall - COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) +if(NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) +endif() # XXX for a normal full distribution we'll need to figure out # XXX how to build both shared and static libraries. |