Skip to content

Commit e5a30ab

Browse files
committed
[Build] Fix passing local natives to the example
resolves #48
1 parent 7a98fb7 commit e5a30ab

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,17 @@ Read [javadoc](https://javadoc.io/doc/io.github.spair/imgui-java-binding) and so
340340
* Ant
341341
* Mingw-w64 (recommended way: use [MSYS2](https://www.msys2.org/) and install [mingw-w64-x86_64-toolchain](https://packages.msys2.org/group/mingw-w64-x86_64-toolchain) group)
342342
- Build with: `./gradlew :imgui-binding:generateLibs -Denvs=win64 -Dlocal`
343-
- Run with: `./gradlew :example:run -DlibPath="../imgui-binding/build/libsNative/windows64"`
343+
- Run with: `./gradlew :example:run -PlibPath="../imgui-binding/build/libsNative/windows64"`
344344
345345
### Linux
346346
- Install dependencies: `openjdk8`, `mingw-w64-gcc`, `ant`. (Package names could vary from system to system.)
347347
- Build with: `./gradlew :imgui-binding:generateLibs -Denvs=linux64 -Dlocal`
348-
- Run with: `./gradlew :example:run -DlibPath=../imgui-binding/build/libsNative/linux64`
348+
- Run with: `./gradlew :example:run -PlibPath=../imgui-binding/build/libsNative/linux64`
349349
350350
### MacOS
351351
- Check dependencies from "Linux" section and make sure you have them installed.
352352
- Build with: `./gradlew :imgui-binding:generateLibs -Denvs=mac64 -Dlocal`
353-
- Run with: `./gradlew :example:run -DlibPath=../imgui-binding/build/libsNative/macosx64`
353+
- Run with: `./gradlew :example:run -PlibPath=../imgui-binding/build/libsNative/macosx64`
354354
355355
In `envs` parameter next values could be used `win32`, `win64`, `linux32`, `linux64` or `mac64`.<br>
356356
`-Dlocal` is optional and means that natives will be built under the `./imgui-binding/build/` folder. Otherwise `/tmp/imgui` folder will be used.

example/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ repositories {
88

99
application {
1010
mainClass = 'Main'
11+
if (libPath) {
12+
applicationDefaultJvmArgs = ["-Dimgui.library.path=$libPath"]
13+
}
1114
}
1215

1316
dependencies {

0 commit comments

Comments
 (0)