Only define an "uninstall" target if it's not already defined (e.g. by projects that include json-c)

This commit is contained in:
Eric Haszlakiewicz
2021-07-25 15:11:11 +00:00
parent be9671e48a
commit 8c727e5ce1

View File

@@ -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.