[build]: add uninstall cmake target (#3511)

This commit is contained in:
Aniket Teredesai
2023-11-06 14:42:36 +05:30
committed by GitHub
parent a470cdce4c
commit b9f98dd8cd
3 changed files with 33 additions and 0 deletions

View File

@ -37,6 +37,17 @@ include(BuildOptions)
# Main sources directory (the second parameter sets the output directory name to raylib)
add_subdirectory(src raylib)
# Uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_MODULE_PATH}/Uninstall.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
if (${BUILD_EXAMPLES})
MESSAGE(STATUS "Building examples is enabled")
add_subdirectory(examples)