android(toolchain): fix find_path() behavior (zlib search problem)

pull/10515/head
Alexander Alekhin 7 years ago
parent 37911e60d8
commit bc6a355370
  1. 8
      platforms/android/android.toolchain.cmake

@ -1587,7 +1587,13 @@ set( ANDROID True )
set( BUILD_ANDROID True )
# where is the target environment
set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
set( CMAKE_FIND_ROOT_PATH
"${ANDROID_TOOLCHAIN_ROOT}/bin"
"${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}"
"${ANDROID_SYSROOT}"
"${ANDROID_NDK}/sysroot" # NDK16+
"${CMAKE_INSTALL_PREFIX}"
"${CMAKE_INSTALL_PREFIX}/share" )
# only search for libraries and includes in the ndk toolchain
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )

Loading…
Cancel
Save