installing a README.md from ${CMAKE_CURRENT_LIST_DIR} to ${CMAKE_INSTALL_DATAROOTDIR}
Hello, I try to copy some files together from the binary tree of the project and the source tree of the project. In my sources documentation folder, I have a README.md file, that I want to copy to the root directory of the install output:
install(
FILES
README.md
DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}
)
Which results in the error message: install FILES given no DESTINATION!
As a "workaround", I found that appending a / to the destination solves my problem:
install(
FILES
README.md
DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/
)
Now, I wonder if this is intended behavior (version is 3.23.1), a bug or just pure luck.
kind regards
Torsten