File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,7 +162,11 @@ if(CMAKE_CROSSCOMPILING)
162162 # /usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/types.h:9:10: fatal error: 'asm/types.h' file not found
163163 # At
164164 # /usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android/asm/
165- set (deps_CFLAGS "${deps_CFLAGS} -I${ANDROID_TOOLCHAIN_ROOT} /sysroot/usr/include/x86_64-linux-android" )
165+ if (CMAKE_ANDROID_ARCH_ABI MATCHES x86_64)
166+ set (deps_CFLAGS "${deps_CFLAGS} -I${ANDROID_TOOLCHAIN_ROOT} /sysroot/usr/include/x86_64-linux-android" )
167+ elseif ()
168+ set (deps_CFLAGS "${deps_CFLAGS} -I${ANDROID_TOOLCHAIN_ROOT} /sysroot/usr/include/i686-linux-android" )
169+ endif ()
166170 endif ()
167171 endif ()
168172endif ()
Original file line number Diff line number Diff line change @@ -126,6 +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 ()
134+
129135 # NOTE: SQLite uses __android_log_print and __android_log_write which is in their liblog library
130136 set (sqlcipher_ldflags "${sqlcipher_ldflags} -llog" )
131137 endif ()
You can’t perform that action at this time.
0 commit comments