Skip to content

Commit 69d1c56

Browse files
committed
Add Android NDK sysroot to SQLCipher build
1 parent 76452c2 commit 69d1c56

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

external/sqlcipher-cmake/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ else()
128128
if(ANDROID)
129129
# NOTE: SQLCipher seems to have trouble finding liblog and libm which is in this folder here
130130
# in the sysroot
131-
set(sqlcipher_ldflags "${sqlcipher_ldflags} -L${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${android_toolchain_prefix}-${android_toolchain_suffix}/${ANDROID_PLATFORM_LEVEL}")
132-
133131
# NOTE: SQLite uses __android_log_print and __android_log_write which is in their liblog library
132+
set(sqlcipher_ldflags "${sqlcipher_ldflags} -L${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${android_toolchain_prefix}-${android_toolchain_suffix}/${ANDROID_PLATFORM_LEVEL}")
134133
set(sqlcipher_ldflags "${sqlcipher_ldflags} -lm -llog")
134+
set(sqlcipher_cflags "${sqlcipher_cflags} --sysroot=${ANDROID_TOOLCHAIN_ROOT}/sysroot")
135135
endif()
136136

137137
set(sqlcipher_cflags "${sqlcipher_cflags} -DSQLCIPHER_CRYPTO_OPENSSL -I${OPENSSL_INCLUDE_DIRS}")

0 commit comments

Comments
 (0)