Unverified Commit ca0d6008 authored by stuartmorgan's avatar stuartmorgan Committed by GitHub

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
parent 52db5e29
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment