1
0
Fork 0

Fix: [Emscripten] install the correct files on install

pull/11934/head
Stepan Dyatkovskiy (kaomoneus) 2021-10-25 14:16:04 +04:00 committed by Patric Stout
parent 96651b5ada
commit 984eb68c14
1 changed files with 23 additions and 11 deletions

View File

@ -23,6 +23,9 @@ install(TARGETS openttd
COMPONENT Runtime
)
if (NOT EMSCRIPTEN)
# Emscripten embeds these files in openttd.data.
# See CMakeLists.txt in the root.
install(DIRECTORY
${CMAKE_BINARY_DIR}/lang
${CMAKE_BINARY_DIR}/baseset
@ -33,6 +36,15 @@ install(DIRECTORY
COMPONENT language_files
REGEX "ai/[^\.]+$" EXCLUDE # Ignore subdirs in ai dir
)
else()
install(FILES
${CMAKE_BINARY_DIR}/openttd.js
${CMAKE_BINARY_DIR}/openttd.wasm
${CMAKE_BINARY_DIR}/openttd.data
DESTINATION ${BINARY_DESTINATION_DIR}
COMPONENT Runtime
)
endif()
install(FILES
${CMAKE_SOURCE_DIR}/COPYING.md
@ -79,7 +91,7 @@ if(OPTION_INSTALL_FHS)
COMPONENT manual)
endif()
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
install(DIRECTORY
${CMAKE_BINARY_DIR}/media/icons
${CMAKE_BINARY_DIR}/media/pixmaps