Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # OPENCV package
- find_package(OpenCV)
- add_library(opencv INTERFACE)
- target_include_directories(opencv
- INTERFACE
- ${OpenCV_INCLUDE_DIRS})
- target_link_libraries(opencv
- INTERFACE
- ${OpenCV_LIBS})
- add_executable(opencv_example example.cpp)
- target_link_libraries(opencv_example
- PRIVATE
- opencv
- )
- # Find OpenCV, you may need to set OpenCV_DIR variable
- # to the absolute path to the directory containing OpenCVConfig.cmake file
- # via the command line or GUI
- find_package(OpenCV REQUIRED)
- # Declare the executable target built from your sources
- add_executable(opencv_example example.cpp)
- # Link your application with OpenCV libraries
- target_link_libraries(opencv_example ${OpenCV_LIBS})
- ...
- add_executable(opencv_example example.cpp)
- target_link_libraries(opencv_example
- PRIVATE
- opencv::core
- opencv::video
- opencv::imgproc
- )
- find_package(OpenCV REQUIRED COMPONENTS core imgproc video)
- add_executable(opencv_example example.cpp)
- target_link_libraries(opencv_example
- PRIVATE
- opencv_core
- opencv_video
- opencv_imgproc
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement