title: executing external native build for cmake
body: <p>cMakeLists.txt content:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.4.1)
  
  SET(CMAKE_CXX_FLAGS "-Wno-error=format-security -Wno-error=pointer-sign")
  
  
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})
  
  
  add_library( # Sets the name of the library.
           native-camera2-lib
  
           # Sets the library as a shared library.
           SHARED
  
           # Provides a relative path to your source file(s).
           src/main/jni/native-camera2-lib.cpp )
  include_directories(src/main/jni/)
  
  find_library( # Sets the name of the path variable.
            log-lib
  
            # Specifies the name of the NDK library that
            # you want CMake to locate.
            log )
  
  target_link_libraries( # Specifies the target library.
                     native-camera2-lib
  
                     # Links the target library to the log library
                     # included in the NDK.
                     ${log-lib} )
  </code></pre>
  
  <p>after run app by android studio.</p>
  
  <blockquote>
    <p>FAILURE: Build failed with an exception.
    13:19:19.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
    13:19:19.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring project ':app'.
    13:19:19.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > executing external native build for cmake D:\AndroidStudioProjects\camerandk\app\src\main\jni\CMakeLists.txt
    13:19:19.936 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] </p>
  </blockquote>