Fix packaging files on web
All checks were successful
Run tests / Run tests (push) Successful in 6m57s
All checks were successful
Run tests / Run tests (push) Successful in 6m57s
This commit is contained in:
parent
c2196d7dc8
commit
d5a513285b
1 changed files with 10 additions and 1 deletions
|
|
@ -219,8 +219,17 @@ function(psemek_package_files_impl target as_resources)
|
|||
COMMAND ${PSEMEK_COPY_FILES} ${ARGN}
|
||||
)
|
||||
elseif(PSEMEK_PLATFORM_WEB AND as_resources)
|
||||
file(GLOB_RECURSE _FILES RELATIVE "${CMAKE_CURRENT_LIST_DIR}" ${ARGN})
|
||||
set(_FILES)
|
||||
foreach(_PATTERN IN LISTS ARGN)
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_PATTERN}")
|
||||
list(APPEND _FILES "${_PATTERN}")
|
||||
else()
|
||||
file(GLOB_RECURSE _TEMP_FILES RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "${_PATTERN}")
|
||||
list(APPEND _FILES ${_TEMP_FILES})
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(_FILE IN LISTS _FILES)
|
||||
message(STATUS "Preloading ${CMAKE_CURRENT_LIST_DIR}/${_FILE} as resources/${_FILE}")
|
||||
target_link_options(${target} PRIVATE
|
||||
"--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/resources/${_FILE}"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue