summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-09-11 18:04:30 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-09-11 18:04:30 +0000
commit32cdf7d9dcf6333283e89fb8e5f8743a8b69094a (patch)
tree5c66ae6f50c314aa2ba6722f1361373cfd4649a5
parentc5cfaf046a34b7fc470411425ca352b04cbb108a (diff)
parent1432b0c1f34f11f79bb68087fe04c7c963a32d62 (diff)
downloadglib-32cdf7d9dcf6333283e89fb8e5f8743a8b69094a.tar.gz
Snap for 10771923 from 1432b0c1f34f11f79bb68087fe04c7c963a32d62 to emu-34-release
Change-Id: Ib0fcdee76fd60af2e7847c221522153be8e5216e
-rw-r--r--glib/CMakeLists.txt44
1 files changed, 30 insertions, 14 deletions
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index c87aa5525..9880fcaaa 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -1,9 +1,11 @@
# darwin-aarch64 PUBLIC os/darwin/aarch64) android_target_link_libraries( glib2
# darwin-x86_64 PUBLIC "-framework CoreFoundation" "-framework AppKit")
-# Let's add in the library
+# Let's add in the library, we are appending the binary type, as we will ship
+# multiple versions on m1.
+message(STATUS "Building glib2 for ${ANDROID_TARGET_TAG}")
android_add_library(
- TARGET glib2
+ TARGET glib2_${ANDROID_TARGET_TAG}
SHARED
LIBNAME
glib-2.0
@@ -120,7 +122,7 @@ android_add_library(
LINUX gjournal-private.c)
target_compile_options(
- glib2
+ glib2_${ANDROID_TARGET_TAG}
PRIVATE -fvisibility=hidden
-Winvalid-pch
-Wextra
@@ -151,11 +153,12 @@ target_compile_options(
-Wno-string-plus-int)
target_compile_definitions(
- glib2 PRIVATE GLIB_COMPILATION _GNU_SOURCE G_DISABLE_CAST_CHECKS
- GLIB_CHARSETALIAS_DIR="")
+ glib2_${ANDROID_TARGET_TAG}
+ PRIVATE GLIB_COMPILATION _GNU_SOURCE G_DISABLE_CAST_CHECKS
+ GLIB_CHARSETALIAS_DIR="")
android_target_include_directories(
- glib2
+ glib2_${ANDROID_TARGET_TAG}
linux
PUBLIC
../os/linux/glib
@@ -164,18 +167,19 @@ android_target_include_directories(
..)
android_target_include_directories(
- glib2
+ glib2_${ANDROID_TARGET_TAG}
darwin
PUBLIC
../os/darwin/glib
../glib
../os/darwin
..)
-android_target_link_libraries(glib2 darwin PUBLIC "-framework CoreFoundation"
- "-framework AppKit" iconv c)
+android_target_link_libraries(
+ glib2_${ANDROID_TARGET_TAG} darwin PUBLIC "-framework CoreFoundation"
+ "-framework AppKit" iconv c)
android_target_include_directories(
- glib2
+ glib2_${ANDROID_TARGET_TAG}
windows
PUBLIC
../os/windows/glib
@@ -183,7 +187,19 @@ android_target_include_directories(
../os/windows
..)
android_target_compile_definitions(
- glib2 windows PRIVATE UNICODE _UNICODE HAVE_ISNAN_IN_LIBC HAVE_ISNAND_IN_LIBC
- HAVE_ISNANF_IN_LIBC HAVE_ISNANL_IN_LIBC)
-android_target_link_libraries(glib2 windows PUBLIC ws2_32::ws2_32)
-android_install_shared(glib2)
+ glib2_${ANDROID_TARGET_TAG} windows
+ PRIVATE UNICODE _UNICODE HAVE_ISNAN_IN_LIBC HAVE_ISNAND_IN_LIBC
+ HAVE_ISNANF_IN_LIBC HAVE_ISNANL_IN_LIBC)
+android_target_link_libraries(glib2_${ANDROID_TARGET_TAG} windows
+ PUBLIC ws2_32::ws2_32)
+android_install_shared(glib2_${ANDROID_TARGET_TAG})
+
+add_library(glib2 ALIAS glib2_${ANDROID_TARGET_TAG})
+android_license(
+ TARGET "glib2"
+ LIBNAME glib-2.0
+ URL "https://android.googlesource.com/platform/external/bluetooth/glib/+/refs/heads/emu-master-dev/"
+ SPDX "LGPL-2.1-only"
+ LICENSE
+ "https://android.googlesource.com/platform/external/bluetooth/glib/+/refs/heads/emu-master-dev/COPYING"
+ LOCAL "${ANDROID_QEMU2_TOP_DIR}/LICENSES/LICENSE.LGPLv21")