11# Project-level configuration.
2- cmake_minimum_required (VERSION 3.10 )
2+ cmake_minimum_required (VERSION 3.13 )
33project (runner LANGUAGES CXX)
44
55# The name of the executable created for the application. Change this to change
66# the on-disk name of your application.
77set (BINARY_NAME "example" )
88# The unique GTK application identifier for this application. See:
99# https://wiki.gnome.org/HowDoI/ChooseApplicationID
10- set (APPLICATION_ID "dev.danvickmiller.flutterformbuilder .example" )
10+ set (APPLICATION_ID "com.flutterformbuilderecosystem .example" )
1111
1212# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
1313# versions of CMake.
@@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR})
5454find_package (PkgConfig REQUIRED)
5555pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
5656
57- add_definitions (-DAPPLICATION_ID="${APPLICATION_ID} " )
58-
59- # Define the application target. To change its name, change BINARY_NAME above,
60- # not the value here, or `flutter run` will no longer work.
61- #
62- # Any new source files that you add to the application should be added here.
63- add_executable (${BINARY_NAME}
64- "main.cc"
65- "my_application.cc"
66- "${FLUTTER_MANAGED_DIR} /generated_plugin_registrant.cc"
67- )
68-
69- # Apply the standard set of build settings. This can be removed for applications
70- # that need different build settings.
71- apply_standard_settings(${BINARY_NAME} )
72-
73- # Add dependency libraries. Add any application-specific dependencies here.
74- target_link_libraries (${BINARY_NAME} PRIVATE flutter)
75- target_link_libraries (${BINARY_NAME} PRIVATE PkgConfig::GTK)
57+ # Application build; see runner/CMakeLists.txt.
58+ add_subdirectory ("runner" )
7659
7760# Run the Flutter tool portions of the build. This must not be removed.
7861add_dependencies (${BINARY_NAME} flutter_assemble)
@@ -86,6 +69,7 @@ set_target_properties(${BINARY_NAME}
8669 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /intermediates_do_not_run"
8770)
8871
72+
8973# Generated plugin build rules, which manage building the plugins and adding
9074# them to the application.
9175include (flutter/generated_plugins.cmake)
@@ -122,6 +106,12 @@ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
122106 COMPONENT Runtime)
123107endforeach (bundled_library)
124108
109+ # Copy the native assets provided by the build.dart from all packages.
110+ set (NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR} native_assets/linux/" )
111+ install (DIRECTORY "${NATIVE_ASSETS_DIR} "
112+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR} "
113+ COMPONENT Runtime)
114+
125115# Fully re-copy the assets directory on each build to avoid having stale files
126116# from a previous install.
127117set (FLUTTER_ASSET_DIR_NAME "flutter_assets" )
0 commit comments