Merge pull request #46 from kiwix/update_android

Update kiwix-lib to new kiwix-android way of building.
This commit is contained in:
Matthieu Gautier 2017-04-24 17:01:39 +02:00 committed by GitHub
commit ac169558c4
4 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kiwix.org.kiwixlib"
>
<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>
</application>
</manifest>

View File

@ -11,3 +11,7 @@ kiwix_jni = custom_target('jni',
) )
kiwix_sources += ['android/kiwix.cpp', kiwix_jni] kiwix_sources += ['android/kiwix.cpp', kiwix_jni]
install_subdir('org', install_dir: 'kiwix-lib/java')
install_subdir('res', install_dir: 'kiwix-lib')
install_data('AndroidManifest.xml', install_dir: 'kiwix-lib')

View File

@ -0,0 +1,3 @@
<resources>
<string name="app_name">Kiwix Lib</string>
</resources>

View File

@ -14,8 +14,12 @@ kiwix_sources += lib_resources
if get_option('android') if get_option('android')
subdir('android') subdir('android')
install_dir = 'kiwix-lib/jniLibs/' + host_machine.cpu_family()
else
install_dir = get_option('libdir')
endif endif
if has_ctpp2_dep if has_ctpp2_dep
kiwix_sources += ['ctpp2/CTPP2VMStringLoader.cpp'] kiwix_sources += ['ctpp2/CTPP2VMStringLoader.cpp']
endif endif
@ -30,4 +34,5 @@ kiwixlib = library('kiwix',
include_directories : inc, include_directories : inc,
dependencies : all_deps, dependencies : all_deps,
version: '1.0.0', version: '1.0.0',
install : true) install: true,
install_dir: install_dir)