Move the Linux runner into a subdirectory (#153812)
Fixes https://github.com/flutter/flutter/issues/60213
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Project-level configuration.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# The name of the executable created for the application. Change this to change
|
||||
@@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME above,
|
||||
# not the value here, or `flutter run` will no longer work.
|
||||
#
|
||||
# Any new source files that you add to the application should be added here.
|
||||
add_executable(${BINARY_NAME}
|
||||
"main.cc"
|
||||
"my_application.cc"
|
||||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
|
||||
)
|
||||
|
||||
# Apply the standard set of build settings. This can be removed for applications
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
|
||||
# Application build; see runner/CMakeLists.txt.
|
||||
add_subdirectory("runner")
|
||||
|
||||
# Run the Flutter tool portions of the build. This must not be removed.
|
||||
add_dependencies(${BINARY_NAME} flutter_assemble)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME in the
|
||||
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
|
||||
# work.
|
||||
#
|
||||
# Any new source files that you add to the application should be added here.
|
||||
add_executable(${BINARY_NAME}
|
||||
"main.cc"
|
||||
"my_application.cc"
|
||||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
|
||||
)
|
||||
|
||||
# Apply the standard set of build settings. This can be removed for applications
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add preprocessor definitions for the application ID.
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
|
||||
|
||||
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
|
||||
@@ -87,10 +87,11 @@
|
||||
"templates/app_shared/linux.tmpl/.gitignore",
|
||||
"templates/app_shared/linux.tmpl/CMakeLists.txt.tmpl",
|
||||
"templates/app_shared/linux.tmpl/flutter/CMakeLists.txt",
|
||||
"templates/app_shared/linux.tmpl/main.cc",
|
||||
"templates/app_shared/linux.tmpl/my_application.cc",
|
||||
"templates/app_shared/linux.tmpl/my_application.cc.tmpl",
|
||||
"templates/app_shared/linux.tmpl/my_application.h",
|
||||
"templates/app_shared/linux.tmpl/runner/CMakeLists.txt",
|
||||
"templates/app_shared/linux.tmpl/runner/main.cc",
|
||||
"templates/app_shared/linux.tmpl/runner/my_application.cc",
|
||||
"templates/app_shared/linux.tmpl/runner/my_application.cc.tmpl",
|
||||
"templates/app_shared/linux.tmpl/runner/my_application.h",
|
||||
"templates/app_shared/macos.tmpl/.gitignore",
|
||||
"templates/app_shared/macos.tmpl/Flutter/Flutter-Debug.xcconfig",
|
||||
"templates/app_shared/macos.tmpl/Flutter/Flutter-Release.xcconfig",
|
||||
|
||||
Reference in New Issue
Block a user