From 35c7c005bab26a5bd2c57c3758b19eead9f76b7b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 22 Dec 2023 16:37:52 +0100 Subject: [PATCH] android/meson.build: move target `org_musicpd_Bridge.h` to include/meson.build --- android/include/meson.build | 18 ++++++++++++++++++ android/{ => include}/run-javac.sh | 5 +---- android/meson.build | 19 +------------------ 3 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 android/include/meson.build rename android/{ => include}/run-javac.sh (68%) diff --git a/android/include/meson.build b/android/include/meson.build new file mode 100644 index 000000000..edcdc8283 --- /dev/null +++ b/android/include/meson.build @@ -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@', + ], +) diff --git a/android/run-javac.sh b/android/include/run-javac.sh similarity index 68% rename from android/run-javac.sh rename to android/include/run-javac.sh index 2a113a721..22daf0c9d 100755 --- a/android/run-javac.sh +++ b/android/include/run-javac.sh @@ -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" \ diff --git a/android/meson.build b/android/meson.build index 0ba6388f8..a9f88ec4b 100644 --- a/android/meson.build +++ b/android/meson.build @@ -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')