Skip to content

Commit

Permalink
[DOCS] add instructions to create meson.build in how-to-create-model.md
Browse files Browse the repository at this point in the history
* This PR adds a missing part in docs/how-to-create-model.md.
* It includes some explanations to write meson.build file of a new application (under Applications/MyApp/jni/ so as to build it.

Signed-off-by: Eunju Yang <[email protected]>
  • Loading branch information
EunjuYang committed Jan 18, 2024
1 parent a2061e7 commit 46d9c8e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/how-to-create-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,35 @@ int main(int argc, char *argv[]) {
```

## Build and Run "MyApp" application


### Add meson.build file under `MyApp/jni`

In order to build MyApp application, it is required to add `meson.build` for it. To this end, create the build file under `Applications/MyApp/jni/`.
Here is an example of `meson.build` file of `MyApp` application.

```
myapp_sources= [
'main.cpp',
cifar_path / 'cifar_dataloader.cpp'
]
myapp_dependencies = [app_utils_dep,
nntrainer_dep,
nntrainer_ccapi_dep
]
e = executable('nntrainer_myapp',
myapp_sources,
include_directories: [include_directories('.'), cifar_include_dir],
dependencies: myapp_dependencies,
install: get_option('install-app'),
install_dir: application_install_dir
)
```

### Build and Run "MyApp" application

To build MyApp application, execute the following command on the NNTrainer directory: "meson build & ninja -C build".
```bash
meson build & ninja -C build
Expand Down

0 comments on commit 46d9c8e

Please sign in to comment.