# Project-level configuration.
cmake_minimum_required(VERSION 3.14)
project(flutter_app4 LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "flutter_app4")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
cmake_policy(SET CMP0063 NEW)
# Define build configuration option.
get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IS_MULTICONFIG)
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
CACHE STRING "" FORCE)
else()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
endif()
# Define settings for the Profile build mode.
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
# Use Unicode for all projects.
add_definitions(-DUNICODE -D_UNICODE)
# Compilation settings that should be applied to most targets.
#
# Be cautious about adding new options here, as plugins use this function by
# default. In most cases, you should add new options to specific targets instead
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
endfunction()
# Flutter library and tool build rules.
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})
# Application build; see runner/CMakeLists.txt.
add_subdirectory("runner")
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)
# === Installation ===
# Support files are copied into place next to the executable, so that it can
# run in place. This is done instead of making a separate bundle (as on Linux)
# so that building and running from within Visual Studio will work.
set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")
# Make the "install" step default, as it's required to run.
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
if(PLUGIN_BUNDLED_LIBRARIES)
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
# Install the AOT library on non-Debug builds only.
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
CONFIGURATIONS Profile;Release
COMPONENT Runtime)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
flutter渲染视频的方法有多种,比如texture、platformview、ffi,其中texture是通过flutter自己提供的一个texture对象与dart界面关联后进行渲染,很容易搜索到android和ios的相关资料,但是windows却几乎找不到。通过查看一些开源库的代码,找出了再windows使用texture渲染的方法,在这里做一个简单的介绍。本资源为文章附件资源,原文链接:https://blog.csdn.net/u013113678/article/details/125492286。
资源推荐
资源详情
资源评论
收起资源包目录
Flutter 使用Texture实现Windows渲染视频 (297个子文件)
generated_plugin_registrant.cc 312B
SDL_config.h.cmake 18KB
generated_plugins.cmake 759B
ffplay.cpp 10KB
win32_window.cpp 7KB
ffplay_plugin.cpp 4KB
flutter_window.cpp 3KB
utils.cpp 2KB
main.cpp 1KB
ffplay_plugin_c_api.cpp 417B
DllImportUtils.cpp 357B
main.dart 2KB
ffplay_plugin_test.dart 1KB
ffplay_plugin_platform_interface.dart 1KB
ffplay_plugin_method_channel_test.dart 663B
ffplay_plugin_method_channel.dart 608B
ffplay_plugin.dart 189B
avcodec-58.dll 42.87MB
avformat-58.dll 10.81MB
avfilter-7.dll 10.36MB
avdevice-58.dll 2.63MB
SDL2.dll 1.4MB
avutil-56.dll 1.01MB
swscale-5.dll 544KB
swresample-3.dll 419KB
postproc-55.dll 132KB
.gitignore 571B
.gitignore 308B
.gitignore 298B
SDL_opengl_glext.h 714KB
avcodec.h 145KB
avformat.h 115KB
SDL_opengles2_gl2ext.h 96KB
SDL_opengl.h 81KB
SDL_egl.h 72KB
SDL_hints.h 56KB
mfxstructures.h 52KB
SDL_video.h 45KB
SDL_render.h 44KB
avfilter.h 41KB
SDL_haptic.h 38KB
opt.h 36KB
SDL_audio.h 35KB
pixfmt.h 34KB
avio.h 32KB
frame.h 32KB
SDL_opengles2_gl2.h 31KB
SDL_events.h 30KB
hwcontext.h 24KB
mem.h 23KB
packet.h 22KB
SDL_stdinc.h 22KB
swresample.h 21KB
SDL_surface.h 20KB
intreadwrite.h 18KB
common.h 18KB
avdevice.h 17KB
SDL_pixels.h 17KB
codec.h 16KB
pixdesc.h 16KB
mfxfei.h 16KB
SDL_keycode.h 15KB
SDL_scancode.h 15KB
codec_id.h 15KB
avstring.h 14KB
SDL_gamecontroller.h 14KB
SDL_joystick.h 14KB
SDL_thread.h 13KB
SDL_test_fuzzer.h 13KB
hdr_dynamic_metadata.h 12KB
log.h 12KB
swscale.h 12KB
mfxplugin.h 11KB
imgutils.h 11KB
buffer.h 11KB
SDL_assert.h 11KB
bsf.h 11KB
SDL_mouse.h 11KB
SDL_atomic.h 11KB
SDL_vulkan.h 11KB
SDL_system.h 10KB
samplefmt.h 10KB
SDL_opengles2_khrplatform.h 10KB
channel_layout.h 9KB
avutil.h 9KB
SDL_syswm.h 9KB
SDL_rwops.h 9KB
SDL_cpuinfo.h 9KB
hash.h 8KB
dict.h 8KB
spherical.h 8KB
mathematics.h 8KB
bprint.h 8KB
mfxdefs.h 8KB
parseutils.h 7KB
SDL_sensor.h 7KB
mfxcamera.h 7KB
hwcontext_vulkan.h 7KB
codec_par.h 7KB
encryption_info.h 7KB
共 297 条
- 1
- 2
- 3
CodeOfCC
- 粉丝: 463
- 资源: 68
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页