build-system: prevent recursive symbolic links

If cmake is called multiple times we can end up with a recursive set of
symbolic links that can confuse package build scripts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-10-19 12:14:34 -07:00
parent ef5c94bb81
commit ff694af92b

View file

@ -18,6 +18,7 @@ if(NOT NO_DOCS)
COMMAND
mkdir -p ${CMAKE_BINARY_DIR}/Documentation/ &&
rm -rf ${CMAKE_BINARY_DIR}/Documentation/images &&
rm -rf ${CMAKE_BINARY_DIR}/Documentation/mobile-images &&
ln -sf ${CMAKE_SOURCE_DIR}/Documentation/images ${CMAKE_BINARY_DIR}/Documentation/images &&
ln -sf ${CMAKE_SOURCE_DIR}/Documentation/mobile-images ${CMAKE_BINARY_DIR}/Documentation/mobile-images
)