1
1
# Project-level configuration.
2
- cmake_minimum_required (VERSION 3.10 )
2
+ cmake_minimum_required (VERSION 3.13 )
3
3
project (runner LANGUAGES CXX)
4
4
5
5
# The name of the executable created for the application. Change this to change
6
6
# the on-disk name of your application.
7
7
set (BINARY_NAME "example" )
8
8
# The unique GTK application identifier for this application. See:
9
9
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
10
- set (APPLICATION_ID "dev.danvickmiller.flutterformbuilder .example" )
10
+ set (APPLICATION_ID "com.flutterformbuilderecosystem .example" )
11
11
12
12
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13
13
# versions of CMake.
@@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR})
54
54
find_package (PkgConfig REQUIRED)
55
55
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56
56
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" )
76
59
77
60
# Run the Flutter tool portions of the build. This must not be removed.
78
61
add_dependencies (${BINARY_NAME} flutter_assemble)
@@ -86,6 +69,7 @@ set_target_properties(${BINARY_NAME}
86
69
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /intermediates_do_not_run"
87
70
)
88
71
72
+
89
73
# Generated plugin build rules, which manage building the plugins and adding
90
74
# them to the application.
91
75
include (flutter/generated_plugins.cmake)
@@ -122,6 +106,12 @@ foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
122
106
COMPONENT Runtime)
123
107
endforeach (bundled_library)
124
108
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
+
125
115
# Fully re-copy the assets directory on each build to avoid having stale files
126
116
# from a previous install.
127
117
set (FLUTTER_ASSET_DIR_NAME "flutter_assets" )
0 commit comments