dev
txt 40 lines 1.75 KB
Raw
1 cmake_minimum_required(VERSION 3.14)
2 project(runner LANGUAGES CXX)
3
4 # Define the application target. To change its name, change BINARY_NAME in the
5 # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 # work.
7 #
8 # Any new source files that you add to the application should be added here.
9 add_executable(${BINARY_NAME} WIN32
10 "flutter_window.cpp"
11 "main.cpp"
12 "utils.cpp"
13 "win32_window.cpp"
14 "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 "Runner.rc"
16 "runner.exe.manifest"
17 )
18
19 # Apply the standard set of build settings. This can be removed for applications
20 # that need different build settings.
21 apply_standard_settings(${BINARY_NAME})
22
23 # Add preprocessor definitions for the build version.
24 target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29
30 # Disable Windows macros that collide with C++ standard library functions.
31 target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32
33 # Add dependency libraries and include directories. Add any application-specific
34 # dependencies here.
35 target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38
39 # Run the Flutter tool portions of the build. This must not be removed.
40 add_dependencies(${BINARY_NAME} flutter_assemble)