Unified psemek_package_resources implementation across platforms (always behaves like glob_recurse)
All checks were successful
Run tests / Run tests (push) Successful in 6m53s
All checks were successful
Run tests / Run tests (push) Successful in 6m53s
This commit is contained in:
parent
d5a513285b
commit
091c467d2b
1 changed files with 12 additions and 11 deletions
|
|
@ -213,12 +213,6 @@ endfunction()
|
||||||
function(psemek_package_files_impl target as_resources)
|
function(psemek_package_files_impl target as_resources)
|
||||||
if(PSEMEK_PACKAGE_MODE)
|
if(PSEMEK_PACKAGE_MODE)
|
||||||
if(PSEMEK_PACKAGE_TARGET)
|
if(PSEMEK_PACKAGE_TARGET)
|
||||||
if(PSEMEK_PLATFORM_ANDROID AND as_resources)
|
|
||||||
add_custom_command(TARGET ${target} POST_BUILD
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
COMMAND ${PSEMEK_COPY_FILES} ${ARGN}
|
|
||||||
)
|
|
||||||
elseif(PSEMEK_PLATFORM_WEB AND as_resources)
|
|
||||||
set(_FILES)
|
set(_FILES)
|
||||||
foreach(_PATTERN IN LISTS ARGN)
|
foreach(_PATTERN IN LISTS ARGN)
|
||||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_PATTERN}")
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${_PATTERN}")
|
||||||
|
|
@ -228,6 +222,13 @@ function(psemek_package_files_impl target as_resources)
|
||||||
list(APPEND _FILES ${_TEMP_FILES})
|
list(APPEND _FILES ${_TEMP_FILES})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
if(PSEMEK_PLATFORM_ANDROID AND as_resources)
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
COMMAND ${PSEMEK_COPY_FILES} ${_FILES}
|
||||||
|
)
|
||||||
|
elseif(PSEMEK_PLATFORM_WEB AND as_resources)
|
||||||
foreach(_FILE IN LISTS _FILES)
|
foreach(_FILE IN LISTS _FILES)
|
||||||
message(STATUS "Preloading ${CMAKE_CURRENT_LIST_DIR}/${_FILE} as resources/${_FILE}")
|
message(STATUS "Preloading ${CMAKE_CURRENT_LIST_DIR}/${_FILE} as resources/${_FILE}")
|
||||||
target_link_options(${target} PRIVATE
|
target_link_options(${target} PRIVATE
|
||||||
|
|
@ -239,7 +240,7 @@ function(psemek_package_files_impl target as_resources)
|
||||||
|
|
||||||
add_custom_command(TARGET ${target} POST_BUILD
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||||
COMMAND zip -v "${_OUTPUT_PATH}" -r ${ARGN}
|
COMMAND zip -v "${_OUTPUT_PATH}" -r ${_FILES}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue