Browse Source

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

tags/json-c-0.16-20220414
Eric Haszlakiewicz 4 years ago
parent
commit
8c727e5ce1
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      CMakeLists.txt

+ 6
- 4
CMakeLists.txt 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.


Loading…
Cancel
Save