I’m from a mechE background, so I might be missing something completely trivial. I installed openCV2.4.1 on my mac (OS X 10.7 Lion) using this, using Unix makefiles. Every goes correctly with make and sudo make install, all the .dylib files are in the lib folder, but I can’t find the header files (“cv.h” etc.) anywhere. The include folder has only cmake_install.cmake, Makefile files, and CMakeFiles folder.
I had openCV 2.3.1 installed via homebrew before, and the headers were all in the include, so I had to add that path to XCode in Library Search Paths. Now I’m not sure how to use the library without it…?
EDIT
I’m using the CMake 2.8.4 GUI. There it specifies “Where is the source code” and “Where to build the binaries”. I’m looking in the folder I specified for “where to build the binaries”. Now that you mentioned it, I checked the source code folder and found the headers, but of course there are no .dylib files there….
Anyhow, I ran CMake again (to another binaries folder, but should be otherwise the same output) to get the output, here it is:
The CXX compiler identification is Clang
The C compiler identification is GNU
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Checking whether C compiler has -isysroot
Checking whether C compiler has -isysroot - yes
Checking whether C compiler supports OSX deployment target flag
Checking whether C compiler supports OSX deployment target flag - yes
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Extracting svn version, please wait...
SVNVERSION: exported
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - found
Looking for unistd.h
Looking for unistd.h - found
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - not found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - found
checking for module 'libdc1394-2'
package 'libdc1394-2' not found
checking for module 'libdc1394'
package 'libdc1394' not found
checking for module 'libavcodec'
package 'libavcodec' not found
checking for module 'libavformat'
package 'libavformat' not found
checking for module 'libavutil'
package 'libavutil' not found
checking for module 'libswscale'
package 'libswscale' not found
Looking for libavformat/avformat.h
Looking for libavformat/avformat.h - not found
Looking for ffmpeg/avformat.h
Looking for ffmpeg/avformat.h - not found
CUDA_TOOLKIT_ROOT_DIR not found or specified
Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "4.1")
Found PythonInterp: /usr/bin/python2.7 (Required is at least version "2.0")
Found PythonLibs: /usr/lib/libpython2.7.dylib (Required is at least version "2.7.1")
General configuration for OpenCV 2.4.1 =====================================
Platform:
Host: Darwin 11.4.0 i386
CMake: 2.8.4
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++
C++ flags (Release): -O3 -DNDEBUG
C++ flags (Debug): -g
C Compiler: /usr/bin/gcc
C flags (Release): -O3 -DNDEBUG
C flags (Debug): -g
Linker flags (Release):
Linker flags (Debug):
OpenCV modules:
To be built: calib3d contrib core features2d flann gpu highgui imgproc legacy ml nonfree objdetect photo python stitching ts video videostab
Disabled: -
Disabled by dependency: -
Unavailable: androidcamera java
GUI:
QT 4.x: NO
Cocoa: YES
OpenGL support: NO
Media I/O:
ZLib: build (ver 1.2.6)
JPEG: build (ver 62)
PNG: build (ver 1.5.9)
TIFF: build (ver 42)
JPEG 2000: build (ver 1.900.1)
OpenEXR: NO
Video I/O:
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: NO
codec: NO
format: NO
util: NO
swscale: NO
gentoo-style: NO
OpenNI: NO
OpenNI PrimeSensor Modules: NO
PvAPI: NO
QuickTime: NO
QTKit: YES
Other third-party libraries:
Use IPP: NO
Use TBB: NO
Use Cuda: NO
Use Eigen: NO
Python:
Interpreter: /usr/bin/python2.7 (ver 2.7.1)
Libraries: /usr/lib/libpython2.7.dylib
numpy: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include (ver 1.5.1)
packages path: lib/python2.7/site-packages
Documentation:
Build Documentation: NO
Sphinx: NO
PdfLaTeX compiler: NO
Tests and samples:
Tests: YES
Performance tests: YES
Examples: NO
Install path: /usr/local
cvconfig.h is in: /Users/steveheim/Documents/opencvtest
-----------------------------------------------------------------
Configuring done
From your CMake output:
Which means that after doing
make installthe OpenCV headers will be copied to/usr/local/include/To change this location you can set/modify the value of
CMAKE_INSTALL_PREFIXCMake variable to a desired location.