diff --git a/CMakeLists.txt b/CMakeLists.txt index 400c145e08..9ed01c2101 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake index 3a894b5a62..b38e88a6c8 100644 --- a/cmake/InstallAndPackage.cmake +++ b/cmake/InstallAndPackage.cmake @@ -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)