Make own OpenCV with CMAKE - Austinsuyoyo/ObjectTrackingInMFC GitHub Wiki

Reference from here

  1. start cmake-gui
    step1

  2. select the opencv source code folder and the folder where binaries will be built (the 2 upper forms of the interface)
    step2

  3. select your compile environment
    step3

  4. press the configure button. you will see all the opencv build parameters in the central interface

  5. browse the parameters and look for the form called OPENCV_EXTRA_MODULES_PATH (use the search form to focus rapidly on it)

  6. complete this OPENCV_EXTRA_MODULES_PATH by the proper pathname to the <opencv_contrib>/modules value using its browse button.
    step6

  7. press the configure button again
    step7

  8. check Build_opencv_tracking,the project need this module

  9. Generate & Open Project
    step9

  10. Build INSTALL ,and change Debug->Release,then build INSTALL again
    step10

  11. Add New Environment Variable
    step11

  12. Edit environment variable Path
    ...;C:\opencv\build\x64\vc14\bin
    step12

  13. Done!