Add: Install additional documentation files with the game

Also include it in Emscripten packages
This commit is contained in:
Niels Martin Hansen 2021-04-03 12:01:29 +02:00 committed by Patric Stout
parent 4765d0f8c2
commit 2cff43251e
2 changed files with 33 additions and 1 deletions

View File

@ -381,6 +381,21 @@ if(EMSCRIPTEN)
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_BINARY_DIR}/lang/english.lng@/lang/english.lng")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/ai@/ai")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/bin/game@/game")
# Documentation files for the in-game text file viewer
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/README.md@/README.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CREDITS.md@/CREDITS.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/CONTRIBUTING.md@/CONTRIBUTING.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/COPYING.md@/COPYING.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/known-bugs.txt@/known-bugs.txt")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/changelog.txt@/changelog.txt")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/admin_network.md@/docs/admin_network.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/debugging_desyncs.md@/docs/debugging_desyncs.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/desync.md@/docs/desync.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/directory_structure.md@/docs/directory_structure.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/linkgraph.md@/docs/linkgraph.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/logging_and_performance_metrics.md@/docs/logging_and_performance_metrics.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/multiplayer.md@/docs/multiplayer.md")
target_link_libraries(WASM::WASM INTERFACE "--preload-file ${CMAKE_SOURCE_DIR}/docs/savegame_format.md@/docs/savegame_format.md")
# We use IDBFS for persistent storage.
target_link_libraries(WASM::WASM INTERFACE "-lidbfs.js")

View File

@ -37,12 +37,29 @@ install(DIRECTORY
install(FILES
${CMAKE_SOURCE_DIR}/COPYING.md
${CMAKE_SOURCE_DIR}/README.md
${CMAKE_SOURCE_DIR}/CREDITS.md
${CMAKE_SOURCE_DIR}/CONTRIBUTING.md
${CMAKE_SOURCE_DIR}/changelog.txt
${CMAKE_SOURCE_DIR}/docs/multiplayer.md
${CMAKE_SOURCE_DIR}/known-bugs.txt
DESTINATION ${DOCS_DESTINATION_DIR}
COMPONENT docs)
install(FILES
${CMAKE_SOURCE_DIR}/docs/admin_network.md
${CMAKE_SOURCE_DIR}/docs/debugging_desyncs.md
${CMAKE_SOURCE_DIR}/docs/desync.md
${CMAKE_SOURCE_DIR}/docs/directory_structure.md
${CMAKE_SOURCE_DIR}/docs/game_coordinator.md
${CMAKE_SOURCE_DIR}/docs/linkgraph.md
${CMAKE_SOURCE_DIR}/docs/logging_and_performance_metrics.md
${CMAKE_SOURCE_DIR}/docs/multiplayer.md
${CMAKE_SOURCE_DIR}/docs/savegame_format.md
${CMAKE_SOURCE_DIR}/docs/obg_format.txt
${CMAKE_SOURCE_DIR}/docs/obm_format.txt
${CMAKE_SOURCE_DIR}/docs/obs_format.txt
DESTINATION ${DOCS_DESTINATION_DIR}/docs
COMPONENT docs)
# A Linux manual only makes sense when using FHS. Otherwise it is a very odd
# file with little context to what it is.
if(OPTION_INSTALL_FHS)