Skip to content

Commit

Permalink
[opencv] Improve CMake usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Jan 19, 2018
1 parent f5939bf commit f522ff0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/opencv/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv)

vcpkg_copy_pdbs()

set(VCPKG_LIBRARY_LINKAGE "dynamic")
Expand Down
5 changes: 5 additions & 0 deletions ports/opencv/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The package opencv provides CMake integration:

find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${OpenCV_LIBS})

0 comments on commit f522ff0

Please sign in to comment.