mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
Start from a clean slate when bundling Linux build (#58174)
BundleUtilities apparently doesn't do build-system-style timestamp analysis when deciding what to copy, and instead just doesn't copy things that are already present. This cleans that bundle directory on each build, so that it includes the up-to-date library versions. Since this is just copying from build artifacts, this is very fast; the build steps themselves are not affected. Fixes https://github.com/flutter/flutter/issues/58049
This commit is contained in:
parent
52db5e29f1
commit
ca0d60087b
|
@ -46,10 +46,17 @@ include(flutter/generated_plugins.cmake)
|
|||
# === Installation ===
|
||||
# By default, "installing" just makes a relocatable bundle in the build
|
||||
# directory.
|
||||
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/bundle" CACHE PATH "..." FORCE)
|
||||
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
||||
endif()
|
||||
|
||||
# BundleUtilities doesn't re-copy changed files, so start with a clean build
|
||||
# bundle directory every time.
|
||||
INSTALL(CODE "
|
||||
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
||||
" COMPONENT Runtime)
|
||||
|
||||
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
||||
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
|
|
Loading…
Reference in a new issue