Lines Matching refs:hello
188 假设我们有一个简单的CMake项目,包含两个源文件:main.cpp和hello.cpp,以及一个头文件hello.h。CMakeLists.txt文件内容如下:
192 project(hello)
194 add_executable(hello main.cpp hello.cpp hello.h)
199 hello/
201 │ └── hello.h
203 ├── hello.cpp
208 1. 在OpenHarmony代码中,增加example目录,将hello示例放在example目录下,在hello目录下新建BUILD.gn文件,示例如下:
218 sources = [ "./src/hello.cpp" ]
219 part_name = "hello"
223 ohos_executable("hello") {
227 part_name = "hello"
250 "name": "hello", # 部件名称
263 "base_group": [ "//example/hello:hello" ],
274 3. 在`vendor\产品厂商\产品名\config.json`中配置新增的example子系统和hello组件,以rk3568为例,示例如下:
296 "component": "hello",
319 ./build.sh --product-name rk3568 -T hello
326 6. 编译产物生成在out/rk3568/example/hello目录下:
328 out/rk3568/example/hello/
329 ├── hello