android/meson.build: move target `org_musicpd_Bridge.h` to include/meson.build

This commit is contained in:
Max Kellermann 2023-12-22 16:37:52 +01:00
parent 1e732f9b9b
commit 35c7c005ba
3 changed files with 20 additions and 22 deletions

View File

@ -0,0 +1,18 @@
javac = find_program('javac')
common_cppflags += '-I' + meson.current_build_dir()
bridge_header = custom_target(
'org_musicpd_Bridge.h',
output: 'org_musicpd_Bridge.h',
input: [
'../app/src/main/java/org/musicpd/Bridge.java',
],
command: [
join_paths(meson.current_source_dir(), 'run-javac.sh'),
javac,
join_paths(android_sdk_platform_dir, 'android.jar'),
'@OUTDIR@',
'@INPUT@',
],
)

View File

@ -2,11 +2,8 @@
JAVAC=$1
CLASSPATH=$2
DIRNAME=$3
GENINCLUDE=$3
GENINCLUDE="$DIRNAME/include"
mkdir -p "$GENINCLUDE"
"$JAVAC" -source 1.8 -target 1.8 -Xlint:-options \
-cp "$CLASSPATH" \
-h "$GENINCLUDE" \

View File

@ -14,21 +14,4 @@ android_sdk_platform_dir = join_paths(android_sdk, 'platforms', android_sdk_plat
android_gradlew = join_paths(meson.current_source_dir(), 'gradlew')
javac = find_program('javac')
common_cppflags += '-I' + join_paths(meson.current_build_dir(), 'include')
bridge_header = custom_target(
'org_musicpd_Bridge.h',
output: 'org_musicpd_Bridge.h',
input: [
'app/src/main/java/org/musicpd/Bridge.java',
],
command: [
join_paths(meson.current_source_dir(), 'run-javac.sh'),
javac,
join_paths(android_sdk_platform_dir, 'android.jar'),
'@OUTDIR@',
'@INPUT@',
],
)
subdir('include')