CMakeLists.txt 1.2 KB

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