CMakeLists.txt 473 B

123456789101112131415
  1. cmake_minimum_required(VERSION 3.6)
  2. set(target mixed_sample)
  3. project(${target} CXX)
  4. set(ANDROID_OPENCV_COMPONENTS "opencv_java" CACHE STRING "")
  5. message(STATUS "ANDROID_ABI=${ANDROID_ABI}")
  6. find_package(OpenCV REQUIRED COMPONENTS ${ANDROID_OPENCV_COMPONENTS})
  7. file(GLOB srcs *.cpp *.c)
  8. file(GLOB hdrs *.hpp *.h)
  9. include_directories("${CMAKE_CURRENT_LIST_DIR}")
  10. add_library(${target} SHARED ${srcs} ${hdrs})
  11. target_link_libraries(${target} ${ANDROID_OPENCV_COMPONENTS})