SgUninstall.cmake 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #.rst:
  2. # SgUninstall
  3. # -----------
  4. #
  5. # `make uninstall` target.
  6. #
  7. # Adds the target `make uninstall` allowing the library uninstallation.
  8. # _
  9. # ___ __ _ __ _ _ _(_)
  10. # / __|/ _` |/ _` | | | | |
  11. # \__ \ (_| | (_| | |_| | |
  12. # |___/\__,_|\__, |\__,_|_|
  13. # |___/
  14. #
  15. # Cross-platform library which helps to develop web servers or frameworks.
  16. #
  17. # Copyright (C) 2016-2019 Silvio Clecio <[email protected]>
  18. #
  19. # Sagui library is free software; you can redistribute it and/or
  20. # modify it under the terms of the GNU Lesser General Public
  21. # License as published by the Free Software Foundation; either
  22. # version 2.1 of the License, or (at your option) any later version.
  23. #
  24. # Sagui library is distributed in the hope that it will be useful,
  25. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  27. # Lesser General Public License for more details.
  28. #
  29. # You should have received a copy of the GNU Lesser General Public
  30. # License along with Sagui library; if not, write to the Free Software
  31. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  32. #
  33. if(__SG_UNINSTALL_INCLUDED)
  34. return()
  35. endif()
  36. set(__SG_UNINSTALL_INCLUDED ON)
  37. if(NOT TARGET uninstall)
  38. configure_file(${CMAKE_MODULE_PATH}/CMakeUninstall.cmake.in
  39. ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY)
  40. add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P
  41. ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake)
  42. endif()