CMakeLists.txt 943 B

1234567891011121314151617181920212223242526
  1. # cmake needs this line
  2. cmake_minimum_required(VERSION 3.1)
  3. # Define project name
  4. project(opencv_example_project)
  5. # Find OpenCV, you may need to set OpenCV_DIR variable
  6. # to the absolute path to the directory containing OpenCVConfig.cmake file
  7. # via the command line or GUI
  8. find_package(OpenCV REQUIRED)
  9. # If the package has been found, several variables will
  10. # be set, you can find the full list with descriptions
  11. # in the OpenCVConfig.cmake file.
  12. # Print some message showing some of them
  13. message(STATUS "OpenCV library status:")
  14. message(STATUS " config: ${OpenCV_DIR}")
  15. message(STATUS " version: ${OpenCV_VERSION}")
  16. message(STATUS " libraries: ${OpenCV_LIBS}")
  17. message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
  18. # Declare the executable target built from your sources
  19. add_executable(opencv_example example.cpp)
  20. # Link your application with OpenCV libraries
  21. target_link_libraries(opencv_example PRIVATE ${OpenCV_LIBS})