<p dir="auto">I just moved to using 3.0 version of OpenCV. This error seems to follow me. I have treid cleaning the project, moving to 3.1, but I cant seem to figure out what I'm missing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cmake .
-- OpenCV ARCH: 
-- OpenCV RUNTIME: 
-- OpenCV STATIC: ON
CMake Warning at /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
  Found OpenCV Windows Pack but it has no binaries compatible with your
  configuration.

  You should manually point CMake variable OpenCV_DIR to your build of OpenCV
  library.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)


CMake Error at CMakeLists.txt:10 (find_package):
  Found package configuration file:

    /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package &quot;OpenCV&quot; is considered to be
  NOT FOUND.


-- Configuring incomplete, errors occurred!
"><pre class="notranslate"><code class="notranslate">$ cmake .
-- OpenCV ARCH: 
-- OpenCV RUNTIME: 
-- OpenCV STATIC: ON
CMake Warning at /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
  Found OpenCV Windows Pack but it has no binaries compatible with your
  configuration.

  You should manually point CMake variable OpenCV_DIR to your build of OpenCV
  library.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)


CMake Error at CMakeLists.txt:10 (find_package):
  Found package configuration file:

    /Applications/opencv-3.1.0/cmake/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
  NOT FOUND.


-- Configuring incomplete, errors occurred!

</code></pre></div>
<p dir="auto">Any tips on tackling this will help. I am building OpenCV on OSX El Capitan. I am not sure if this is a problem with cmake or opencv. Envorinment variables seem to be correct. Thanks!</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 3.4</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; Visual Studio 2017</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I have a problem while writing a video file whose frame size is huge(3840*2160). VideoWriter did not give any error but output file is missing codec information hence producing corrupted file.</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="bool read_write_video(string video_path, string out_video_path) {
        VideoCapture capture(0);
	try {
		capture.open(video_path);
		double dWidth = capture.get(CV_CAP_PROP_FRAME_WIDTH);
		double dHeight = capture.get(CV_CAP_PROP_FRAME_HEIGHT);
		Size frameSize(static_cast&lt;int&gt;(dWidth), static_cast&lt;int&gt;(dHeight));
		double fps = capture.get(CV_CAP_PROP_FPS);
		int four_cc = (int)capture.get(CV_CAP_PROP_FOURCC);
		if (four_cc &lt;= 0) {
			return false;
		}
		VideoWriter videowriter(out_video_path, four_cc, fps, frameSize, true);
		while(capture.isOpened()){
			Mat frame;
			capture.read(frame);
			if (frame.empty()) break;
			videowriter.write(frame);
			frame.release();
		}
		videowriter.release();
		capture.release();
		return true;
	}
	catch (exception ex) {
		return false;
	}
}"><pre class="notranslate"><span class="pl-k">bool</span> <span class="pl-en">read_write_video</span>(string video_path, string out_video_path) {
        VideoCapture <span class="pl-smi">capture</span>(<span class="pl-c1">0</span>);
	<span class="pl-k">try</span> {
		capture.<span class="pl-c1">open</span>(video_path);
		<span class="pl-k">double</span> dWidth = capture.<span class="pl-c1">get</span>(CV_CAP_PROP_FRAME_WIDTH);
		<span class="pl-k">double</span> dHeight = capture.<span class="pl-c1">get</span>(CV_CAP_PROP_FRAME_HEIGHT);
		<span class="pl-c1">Size</span> <span class="pl-smi">frameSize</span>(<span class="pl-k">static_cast</span>&lt;<span class="pl-k">int</span>&gt;(dWidth), <span class="pl-k">static_cast</span>&lt;<span class="pl-k">int</span>&gt;(dHeight));
		<span class="pl-k">double</span> fps = capture.<span class="pl-c1">get</span>(CV_CAP_PROP_FPS);
		<span class="pl-k">int</span> four_cc = (<span class="pl-k">int</span>)capture.<span class="pl-c1">get</span>(CV_CAP_PROP_FOURCC);
		<span class="pl-k">if</span> (four_cc &lt;= <span class="pl-c1">0</span>) {
			<span class="pl-k">return</span> <span class="pl-c1">false</span>;
		}
		VideoWriter <span class="pl-smi">videowriter</span>(out_video_path, four_cc, fps, frameSize, <span class="pl-c1">true</span>);
		<span class="pl-k">while</span>(capture.<span class="pl-c1">isOpened</span>()){
			Mat frame;
			capture.<span class="pl-c1">read</span>(frame);
			<span class="pl-k">if</span> (frame.<span class="pl-c1">empty</span>()) <span class="pl-k">break</span>;
			videowriter.<span class="pl-c1">write</span>(frame);
			frame.<span class="pl-c1">release</span>();
		}
		videowriter.<span class="pl-c1">release</span>();
		capture.<span class="pl-c1">release</span>();
		<span class="pl-k">return</span> <span class="pl-c1">true</span>;
	}
	<span class="pl-k">catch</span> (<span class="pl-c1">exception</span> ex) {
		<span class="pl-k">return</span> <span class="pl-c1">false</span>;
	}
}</pre></div>