CMakeLists.txt 638 B

1234567891011121314151617181920212223
  1. cmake_minimum_required(VERSION 3.9)
  2. project(picodet-mnn)
  3. set(CMAKE_CXX_STANDARD 17)
  4. set(MNN_DIR PATHS "./mnn")
  5. # find_package(OpenCV REQUIRED PATHS "/work/dependence/opencv/opencv-3.4.3/build")
  6. find_package(OpenCV REQUIRED)
  7. include_directories(
  8. ${MNN_DIR}/include
  9. ${MNN_DIR}/include/MNN
  10. ${CMAKE_SOURCE_DIR}
  11. )
  12. link_directories(mnn/lib)
  13. add_library(libMNN SHARED IMPORTED)
  14. set_target_properties(
  15. libMNN
  16. PROPERTIES IMPORTED_LOCATION
  17. ${CMAKE_SOURCE_DIR}/mnn/lib/libMNN.so
  18. )
  19. add_executable(picodet-mnn main.cpp picodet_mnn.cpp)
  20. target_link_libraries(picodet-mnn MNN ${OpenCV_LIBS} libMNN.so)