2022-05-23 11:25:55 +03:00
cmake_minimum_required ( VERSION 3.14 )
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 } WIN32
" f l u t t e r _ w i n d o w . c p p "
" m a i n . c p p "
" u t i l s . c p p "
" w i n 3 2 _ w i n d o w . c p p "
" $ { F L U T T E R _ M A N A G E D _ D I R } / g e n e r a t e d _ p l u g i n _ r e g i s t r a n t . c c "
" R u n n e r . r c "
" r u n n e r . e x e . m a n i f e s t "
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings ( ${ BINARY_NAME } )
2023-06-05 15:27:48 +03:00
# Add preprocessor definitions for the build version.
target_compile_definitions ( ${ BINARY_NAME } PRIVATE "FLUTTER_VERSION=\" ${ FLUTTER_VERSION } \"")
target_compile_definitions ( ${ BINARY_NAME } PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}" )
target_compile_definitions ( ${ BINARY_NAME } PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}" )
target_compile_definitions ( ${ BINARY_NAME } PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}" )
target_compile_definitions ( ${ BINARY_NAME } PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}" )
2022-05-23 11:25:55 +03:00
# Disable Windows macros that collide with C++ standard library functions.
target_compile_definitions ( ${ BINARY_NAME } PRIVATE "NOMINMAX" )
# Add dependency libraries and include directories. Add any application-specific
# dependencies here.
target_link_libraries ( ${ BINARY_NAME } PRIVATE flutter flutter_wrapper_app )
target_include_directories ( ${ BINARY_NAME } PRIVATE "${CMAKE_SOURCE_DIR}" )
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies ( ${ BINARY_NAME } flutter_assemble )