Skip to content

Commit f1e5464

Browse files
committed
Remove lwjgl-libs folder used for example app
Replaced with testRuntimeOnly dependencies to actual LWJGL natives
1 parent 358628d commit f1e5464

File tree

7 files changed

+16
-1
lines changed

7 files changed

+16
-1
lines changed

imgui-lwjgl3/build.gradle

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.gradle.internal.os.OperatingSystem
2+
13
plugins {
24
id 'java'
35
id 'checkstyle'
@@ -7,20 +9,33 @@ plugins {
79

810
sourceCompatibility = 1.8
911

12+
switch (OperatingSystem.current()) {
13+
case OperatingSystem.LINUX:
14+
project.ext.lwjglNatives = 'natives-linux'
15+
break
16+
case OperatingSystem.WINDOWS:
17+
project.ext.lwjglNatives = 'natives-windows'
18+
break
19+
}
20+
1021
dependencies {
1122
implementation platform("org.lwjgl:lwjgl-bom:3.2.3")
1223

1324
implementation 'org.lwjgl:lwjgl'
1425
implementation 'org.lwjgl:lwjgl-glfw'
1526
implementation 'org.lwjgl:lwjgl-opengl'
1627

28+
testRuntimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
29+
testRuntimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
30+
testRuntimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
31+
1732
implementation project(':imgui-binding')
1833
}
1934

2035
task startExample(type: JavaExec, dependsOn: build) {
2136
main = 'ImGuiGlfwExample'
2237
classpath = sourceSets.test.runtimeClasspath
23-
jvmArgs = ['-Djava.library.path=../bin', '-Dorg.lwjgl.librarypath=./lwjgl-libs']
38+
jvmArgs = ['-Djava.library.path=../bin']
2439
}
2540

2641
task sourcesJar(type: Jar, dependsOn: classes) {

imgui-lwjgl3/lwjgl-libs/glfw.dll

-355 KB
Binary file not shown.

imgui-lwjgl3/lwjgl-libs/libglfw.so

-274 KB
Binary file not shown.
-327 KB
Binary file not shown.
-354 KB
Binary file not shown.

imgui-lwjgl3/lwjgl-libs/lwjgl.dll

-380 KB
Binary file not shown.
-335 KB
Binary file not shown.

0 commit comments

Comments
 (0)