]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Only define an "uninstall" target if it's not already defined (e.g. by projects that...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Sun, 25 Jul 2021 15:11:11 +0000 (15:11 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Sun, 25 Jul 2021 15:11:11 +0000 (15:11 +0000)
CMakeLists.txt

index 01d37f8bb53d07bedf9aa0aa9d1e4726ccfdc039..ed7bc03bfe2c4e7d690da922cea35656826c98c8 100644 (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.