musikr: shrink end taglib jni size

Use some magic linker flags that @Tolriq found over in
https://github.com/taglib/taglib/issues/1212#issuecomment-2326456903
that somehow reduced linked so size by ~2mb.
This commit is contained in:
Alexander Capehart 2024-12-23 10:46:53 -05:00
parent 046a02de00
commit 787a78f845
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -50,6 +50,12 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
JVMTagMap.cpp
JVMMetadataBuilder.cpp
)
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
# @Tolriq found that these flags can reduce the size of the linked
# taglib + jni shim shared library. Kudos to them.
# https://github.com/taglib/taglib/issues/1212#issuecomment-2326456903
LINK_FLAGS
"-Wl,--exclude-libs,ALL")
# Specifies libraries CMake should link to your target library. You
# can link libraries from various origins, such as libraries defined in this