Itseez/opencv — pull request #3491 by mshabunin (2014-12-08 11:58:34+00:00)
Title: Build separate world-like iOS framework for contrib

This change allows to build world package containing only contrib modules and adds iOS framework build support.
Linked with Itseez/opencv_contrib#147.
New cmake parameter added: `OPENCV_EXTRA_WORLD`; setting this to `ON` change default world building behavior - default value of `OPENCV_MODULE_IS_PART_OF_WORLD` is set to `ON` for contrib modules and `OFF` for main modules.

To build iOS framework, one need to pass path to opencv_contrib repository to python script as follows:
```
python /platforms/ios/build_framework.py --contrib
```

Known problems:
- all main modules will be build too but not included into opencv_contrib.framework
- headers generated for OpenCL needs `opencv2/core/ocl.hpp` to be included
- file `Info.plist` for osx is affected too
- new framework will be named _opencv_contrib.framework_ and, I guess, users will need to import `opencv_contrib/

.hpp`, not `opencv2/

.hpp`
- some modules in opencv_contrib can not be build as-is and need additional changes

Framework has following layout:
```
opencv2_contrib.framework
├── Headers -> Versions/Current/Headers
├── opencv2_contrib -> Versions/Current/opencv2_contrib
├── Resources -> Versions/Current/Resources
└── Versions
├── A
│ ├── Headers
│ ├── opencv2_contrib
│ └── Resources
│ └── Info.plist
└── Current -> A
```