用于 Android 的 libpng
静态库。
- Android SDK 19+
- Android Studio 4.1.+
- 添加源
allprojects {
repositories {
// ...
maven { url 'https://jitpack.io' }
}
}
- 添加依赖
dependencies {
// ...
implementation "com.github.LimeVista:libpng-android-prefab:${ver}"
}
- 启用
prefab
(预制模式)
android {
// ...
buildFeatures {
prefab true
}
}
- 修改
CMakeLists.txt
# ...
find_package(libpng REQUIRED CONFIG)
# ...
target_link_libraries(your-lib
libpng::png_static
${ZLIB_LIBRARY}
z
# ...
)