Skip to content

Commit 401690a

Browse files
CMake fix for projects without plugins (flutter#59343)
This install step fails if the list is empty, which is the case for projects without plugins (or Dart-only plugins, so flutter/plugins presubmits are currently broken).
1 parent d64884d commit 401690a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/flutter_tools/templates/app/linux.tmpl/CMakeLists.txt.tmpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}
6767

6868
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
6969
COMPONENT Runtime)
70-
71-
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
72-
COMPONENT Runtime)
70+
71+
if(PLUGIN_BUNDLED_LIBRARIES)
72+
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
73+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
74+
COMPONENT Runtime)
75+
endif()
7376

7477
# Fully re-copy the assets directory on each build to avoid having stale files
7578
# from a previous install.
@@ -81,7 +84,7 @@ install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
8184
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
8285

8386
# Install the AOT library on non-Debug builds only.
84-
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
87+
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
8588
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
8689
COMPONENT Runtime)
8790
endif()

0 commit comments

Comments
 (0)