- download windows version
- cd new build folder
- run cmake
cmake -G "MinGW Makefiles" -S <source>
- build opencv
mingw32-make -j8
- install opencv
mingw32-make install
- update cmakelists
# include opencv library
set(OpenCV_DIR "C:/Program Files (x86)/opencv/mingw_build/install")
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
7, edit configuration, add environment variables:
if not work, add the path in #7 to system environment path
Top comments (0)