cmake(android): update zlib alias condition
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Fri, 5 Jan 2018 03:53:00 +0000 (03:53 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Fri, 5 Jan 2018 04:52:17 +0000 (04:52 +0000)
To use 'z' in Android.mk instead of absolute path from the build machine.

cmake/OpenCVFindLibsGrfmt.cmake

index 0ae58c8..ab1dcd9 100644 (file)
@@ -8,8 +8,7 @@ if(BUILD_ZLIB)
 else()
   find_package(ZLIB "${MIN_VER_ZLIB}")
   if(ZLIB_FOUND AND ANDROID)
-    if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR
-        ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so")
+    if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$")
       set(ZLIB_LIBRARIES z)
     endif()
   endif()