CMake, Windows: install News, Readme, and html as UserManual

For Windows to match 0.103 installer behavior, include NEWS.md and
README.md and rename the html directory to UserManual during the
install.

Unfortunately I can't match the behavior for the main page for the
user manual. It is now called index.html instead of UserManual.html
and is inside the UserManual directory instead of at the top level.
This commit is contained in:
Micah Snyder 2021-08-26 15:39:32 -07:00 committed by Micah Snyder
parent 23dfe8fc4c
commit 382ac2764c
2 changed files with 9 additions and 2 deletions

View file

@ -315,6 +315,13 @@ if (WIN32)
SET(CPACK_WIX_CMAKE_PACKAGE_REGISTRY ClamAV) SET(CPACK_WIX_CMAKE_PACKAGE_REGISTRY ClamAV)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "ClamAV") set(CPACK_PACKAGE_INSTALL_DIRECTORY "ClamAV")
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/NEWS.md
${CMAKE_CURRENT_SOURCE_DIR}/README.md
DESTINATION "."
COMPONENT documentation)
elseif(APPLE) elseif(APPLE)
set(CPACK_GENERATOR productbuild) set(CPACK_GENERATOR productbuild)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.macos.universal) set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.macos.universal)

View file

@ -109,8 +109,8 @@ endif()
# which is exported from the clamav-faq repo. # which is exported from the clamav-faq repo.
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/index.html) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/index.html)
if(WIN32) if(WIN32)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html/
DESTINATION . DESTINATION ./UserManual
COMPONENT documentation) COMPONENT documentation)
else() else()
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html