Changeset - r28624:364bdb14afa0
[Not reviewed]
master
0 1 0
Patric Stout - 10 months ago 2024-01-30 23:33:21
truebrain@openttd.org
Fix #9655: [Emscripten] install the correct files on install (#11934)

Co-authored-by: Stepan Dyatkovskiy (kaomoneus) <ml@dyatkovskiy.com>
1 file changed with 23 insertions and 11 deletions:
0 comments (0 inline, 0 general)
cmake/InstallAndPackage.cmake
Show inline comments
 
@@ -20,22 +20,34 @@ endif()
 
install(TARGETS openttd
 
        RUNTIME
 
            DESTINATION ${BINARY_DESTINATION_DIR}
 
            COMPONENT Runtime
 
        )
 

	
 
install(DIRECTORY
 
                ${CMAKE_BINARY_DIR}/lang
 
                ${CMAKE_BINARY_DIR}/baseset
 
                ${CMAKE_BINARY_DIR}/ai
 
                ${CMAKE_BINARY_DIR}/game
 
                ${CMAKE_SOURCE_DIR}/bin/scripts
 
        DESTINATION ${DATA_DESTINATION_DIR}
 
        COMPONENT language_files
 
        REGEX "ai/[^\.]+$" EXCLUDE # Ignore subdirs in ai dir
 
)
 
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
 
                    ${CMAKE_BINARY_DIR}/ai
 
                    ${CMAKE_BINARY_DIR}/game
 
                    ${CMAKE_SOURCE_DIR}/bin/scripts
 
            DESTINATION ${DATA_DESTINATION_DIR}
 
            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
 
                ${CMAKE_SOURCE_DIR}/README.md
 
                ${CMAKE_SOURCE_DIR}/CREDITS.md
 
                ${CMAKE_SOURCE_DIR}/CONTRIBUTING.md
 
@@ -76,13 +88,13 @@ if(OPTION_INSTALL_FHS)
 
    install(FILES
 
                    ${MAN_BINARY_FILE}.gz
 
            DESTINATION ${MAN_DESTINATION_DIR}/man6
 
            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
 
            DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}
 
            COMPONENT media)
 

	
0 comments (0 inline, 0 general)