Closed chuong closed 5 years ago
It should be
find_package(OpenCV REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main ${OpenCV_LIBS})
Hi @chuong , thanks for reporting this issue. I have tested the cmake configuration of opencv, they are correct in the latest version. Plz update vcpkg and rebuild it, then you may find notice as:
The package opencv provides CMake integration: \ find_package(OpenCV REQUIRED) target_include_directories(main PRIVATE ${OpenCV_INCLUDE_DIRS}) target_link_libraries(main PRIVATE ${OpenCV_LIBS})
Thx.
I'm using Windows 10 Anniversary and OpenCV was successfully installed with
.\vcpkg install opencv
.I got the above error although everything seems to work well until I run build solution on Visual Studio Community 2017.
main.cpp created as:
CMakeLists.txt is:
CMakeSettings.json is:
Output when generating cache of CMakeLists.txt is:
However, the above error shows up when I try to compile the solution via Build menu.