From 0ebda15dca1f6d7aecedaabd4a9b0b27af3dc21f Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sat, 3 Sep 2022 02:04:30 -0300 Subject: [PATCH] build: Fix uninstallation of pkg-config files --- build-support/custom-modules/ns3-cmake-package.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-support/custom-modules/ns3-cmake-package.cmake b/build-support/custom-modules/ns3-cmake-package.cmake index 000891a4c..734245ab4 100644 --- a/build-support/custom-modules/ns3-cmake-package.cmake +++ b/build-support/custom-modules/ns3-cmake-package.cmake @@ -99,6 +99,11 @@ function(pkgconfig_module libname) # Set file to be installed install(FILES ${pkgconfig_file} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + add_custom_target( + uninstall_pkgconfig_${module_name} + COMMAND rm ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig/ns3-${module_name}.pc + ) + add_dependencies(uninstall uninstall_pkgconfig_${module_name}) endfunction() function(ns3_cmake_package)