CMakeLists.txt 514 B

123456789101112131415
  1. find_package(OpenCV QUIET COMPONENTS core highgui imgproc imgcodecs)
  2. if(NOT OpenCV_FOUND)
  3. find_package(OpenCV REQUIRED COMPONENTS core highgui imgproc)
  4. endif()
  5. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
  6. include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src)
  7. set(NCNN_EXAMPLE_LINK_LIBRARIES ncnn ${OpenCV_LIBS})
  8. if(NCNN_VULKAN)
  9. list(APPEND NCNN_EXAMPLE_LINK_LIBRARIES ${Vulkan_LIBRARY})
  10. endif()
  11. add_executable(psenet psenet.cpp)
  12. target_link_libraries(psenet ${NCNN_EXAMPLE_LINK_LIBRARIES})