Skip to content

Commit 6e67a18

Browse files
committed
[Build] Make freetype optional
1 parent e8678ef commit 6e67a18

File tree

7 files changed

+18
-0
lines changed

7 files changed

+18
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

buildSrc/scripts/copy-ft.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
BASEDIR=$(dirname "$0")
4+
cd $BASEDIR/../.. || exit
5+
6+
mkdir ./bin/freetype
7+
8+
[ -e "/tmp/imgui/libsNative/windows32/imgui-java.dll" ] && cp /tmp/imgui/libsNative/windows32/imgui-java.dll ./bin/freetype
9+
[ -e "/tmp/imgui/libsNative/windows64/imgui-java64.dll" ] && cp /tmp/imgui/libsNative/windows64/imgui-java64.dll ./bin/freetype
10+
[ -e "/tmp/imgui/libsNative/linux32/libimgui-java.so" ] && cp /tmp/imgui/libsNative/linux32/libimgui-java.so ./bin/freetype
11+
[ -e "/tmp/imgui/libsNative/linux64/libimgui-java64.so" ] && cp /tmp/imgui/libsNative/linux64/libimgui-java64.so ./bin/freetype
12+
[ -e "/tmp/imgui/libsNative/macosx64/libimgui-java64.dylib" ] && cp /tmp/imgui/libsNative/macosx64/libimgui-java64.dylib ./bin/freetype
File renamed without changes.

imgui-binding-natives/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ if (System.getProperty('deployWin32')) {
4040
libName = 'libimgui-java64.dylib'
4141
}
4242

43+
if (System.getProperty('freetype')) {
44+
packageName += 'ft'
45+
packageDesc += 'with Freetype support'
46+
libName = 'freetype/' + libName
47+
}
48+
4349
jar {
4450
from('../bin') {
4551
include "$libName" // it's ok

0 commit comments

Comments
 (0)