action:运行脚本以生成文件。 action_foreach:为每个源文件运行一次脚本。 bundle_data:声明数据以进入 Mac/iOS 捆绑包。 create_bundle:创建苹果/iOS 捆绑包。 executable:生成可执行文件。 group:引用一个或多个其他目标的虚拟依赖关系节点。 shared_library:共享库.dll或 .so。 loadable_module:仅在运行时可加载...
可以使用模板创建自定义目标类型,来扩充内置的目标类型。 action:运行脚本以生成文件。 action_foreach:为每个源文件运行一次脚本。 bundle_data:声明数据以进入 Mac/iOS 捆绑包。 create_bundle:创建苹果/iOS 捆绑包。 executable:生成可执行文件。 group:引用一个或多个其他目标的虚拟依赖关系节点。 shared_library:...
可以使用模板创建自定义目标类型,来扩充内置的目标类型。 action:运行脚本以生成文件。 action_foreach:为每个源文件运行一次脚本。 bundle_data:声明数据以进入 Mac/iOS 捆绑包。 create_bundle:创建苹果/iOS 捆绑包。 executable:生成可执行文件。 group:引用一个或多个其他目标的虚拟依赖关系节点。 shared_library:...
8. action_foreach 9. copy 10. bundle_data 教程 gn.googlesource.com/gn/ defines 语法 在GN 构建系统中,defines是一个构建文件(如.gn或者BUILD.gn文件)中的一个变量,它用于指定编译时的预处理器宏定义。这些宏定义会作为参数传递给编译器,通常用于条件编译,即根据宏的定义来包含或排除代码块。 defines = ...
action: 运行脚本以生成文件 executable: 生成可执行文件 group: 生成依赖关系组 shared_library: 生成.dll或.so动态链接库 static_library: 生成.lib或.a 静态链接库 ... 1. 2. 3. 4. 5. 6.配置项 | Configs 记录完成目标项所需的配置信息,例如: ...
action_foreach:为每个源文件运行一次脚本。 bundle_data:声明数据加入到Mac / iOS包。 create_bundle:创建一个Mac / iOS包。 executable:生成一个可执行文件。 group:引用一个或多个其他目标的虚拟依赖关系节点。 shared_library:.dll或.so。 loadable_module:.dll或.so只能在运行时加载。
action_foreach(idl_target_name){...}#Your template should always define a targetwiththe name target_name.#When other targets depend on your template invocation,thiswill be the #destinationofthat dependency.source_set(target_name){...deps=[":$idl_target_name"]# Require the sources to be ...
action,action _foreach:执行脚本 bundle_data,create_bundle:Mac&iOS 条件和表达式 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 component(“base”){sources=[“a.cc”,“b.cc”,]if(is_win||is_linux){sources+=[“win_helper.cc”]}else{sources-=[“a.cc”]}} ...
action: Declare a target that runs a script a single time. action_foreach: Declare a target that runs a script over a set of files. bundle_data: [iOS/macOS] Declare a target without output. copy: Declare a target that copies files. create_bundle: [iOS/macOS] Build an iOS or macOS ...
action_foreach bundle_deta、create_bundle:仅mac和ios 条件分支 component(“base”) { sources = [ “a.cc”, “b.cc”, ] if (is_win || is_linux) { sources += [ “win_helper.cc” ] } else { sources -= [ “a.cc” ]