File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ if(CMAKE_CROSSCOMPILING)
164164 # /usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android/asm/
165165 if (CMAKE_ANDROID_ARCH_ABI MATCHES x86_64)
166166 set (deps_CFLAGS "${deps_CFLAGS} -I${ANDROID_TOOLCHAIN_ROOT} /sysroot/usr/include/x86_64-linux-android" )
167- elseif ()
167+ else ()
168168 set (deps_CFLAGS "${deps_CFLAGS} -I${ANDROID_TOOLCHAIN_ROOT} /sysroot/usr/include/i686-linux-android" )
169169 endif ()
170170 endif ()
Original file line number Diff line number Diff line change @@ -126,14 +126,12 @@ else()
126126 endif ()
127127
128128 if (ANDROID )
129- # NOTE: x86 build seems to have trouble finding -llog, help it find it by specifying the
130- # library path
131- if (CMAKE_ANDROID_ARCH_ABI MATCHES x86)
132- set (sqlcipher_ldflags "${sqlcipher_ldflags} -L${ANDROID_TOOLCHAIN_ROOT} /sysroot/usr/lib/i686-linux-android/${ANDROID_PLATFORM_LEVEL} -lm" )
133- endif ()
129+ # NOTE: SQLCipher seems to have trouble finding liblog and libm which is in this folder here
130+ # 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} " )
134132
135133 # NOTE: SQLite uses __android_log_print and __android_log_write which is in their liblog library
136- set (sqlcipher_ldflags "${sqlcipher_ldflags} -llog" )
134+ set (sqlcipher_ldflags "${sqlcipher_ldflags} -lm - llog" )
137135 endif ()
138136
139137 set (sqlcipher_cflags "${sqlcipher_cflags} -DSQLCIPHER_CRYPTO_OPENSSL -I${OPENSSL_INCLUDE_DIRS} " )
You can’t perform that action at this time.
0 commit comments