Commit 1f0035d2 authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed native_camera library build for Androids having version in x.x format

parent fa7e4589
...@@ -1106,8 +1106,11 @@ Set this variable to path to your Android sources to compile ...@@ -1106,8 +1106,11 @@ Set this variable to path to your Android sources to compile
libnative_camera_rx.x.x.so for your Android") libnative_camera_rx.x.x.so for your Android")
SET(BUILD_ANDROID_CAMERA_WRAPPER OFF) SET(BUILD_ANDROID_CAMERA_WRAPPER OFF)
if (ANDROID_SOURCE_TREE) if (ANDROID_SOURCE_TREE)
FILE(STRINGS "${ANDROID_SOURCE_TREE}/development/sdk/platform_source.properties" ANDROID_VERSION REGEX "Platform\\.Version=[0-9]+\\.[0-9]+\\.[0-9]+" ) FILE(STRINGS "${ANDROID_SOURCE_TREE}/development/sdk/platform_source.properties" ANDROID_VERSION REGEX "Platform\\.Version=[0-9]+\\.[0-9]+(\\.[0-9]+)?" )
string(REGEX REPLACE "Platform\\.Version=([0-9]+\\.[0-9]+\\.[0-9]+)" "\\1" ANDROID_VERSION "${ANDROID_VERSION}") string(REGEX REPLACE "Platform\\.Version=([0-9]+\\.[0-9]+(\\.[0-9]+)?)" "\\1" ANDROID_VERSION "${ANDROID_VERSION}")
if (ANDROID_VERSION MATCHES "^[0-9]+\\.[0-9]+$")
SET(ANDROID_VERSION "${ANDROID_VERSION}.0")
endif()
if(NOT "${ANDROID_VERSION}" STREQUAL "") if(NOT "${ANDROID_VERSION}" STREQUAL "")
SET(BUILD_ANDROID_CAMERA_WRAPPER ON) SET(BUILD_ANDROID_CAMERA_WRAPPER ON)
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment