Merge pull request #4913 from rael346/cmake-uninstall-conflict
Only create uninstall target when raylib is top level
This commit is contained in:
commit
1d020d6db1
1 changed files with 3 additions and 2 deletions
|
@ -46,8 +46,9 @@ endif()
|
||||||
# Main sources directory (the second parameter sets the output directory name to raylib)
|
# Main sources directory (the second parameter sets the output directory name to raylib)
|
||||||
add_subdirectory(src raylib)
|
add_subdirectory(src raylib)
|
||||||
|
|
||||||
# Uninstall target
|
# Uninstall target, only create when building raylib by itself
|
||||||
if(NOT TARGET uninstall)
|
# Avoid conflicting target names when using raylib with other libraries
|
||||||
|
if(NOT TARGET uninstall AND PROJECT_IS_TOP_LEVEL)
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue