So after a little bit of headaches, it worked for me :). Below is summary of what I did.
- A new git clone of the official OpenCV repo. (as mentioned by @berak in his comments) (It didn't make any change).
- Used Visual Studio 2012 (instead of 2010).
- Reinstalled Python and Numpy.
Explanation
I tried building with 2.4 branch. It worked fine. So I thought problem may be with master branch.
I cloned the repo to a new folder and tried CMake on it. But still BUILD_opencv_python is missing. So I don't think that was the issue. And thanks to @berak and @Alexander Mordvintsev for making sure there is no issue in their system. (That means problem is inside my system, not repo).
Then I started to reinstall everything. I changed VS2010 to VS2012.
I installed Python 64-bit, but later I knew there is no official binary of Numpy for 64 bit and I need to compile it from source or pip install. But both require the same exact version of VStudio used for compiling Python, which is VS2008. ( I don't want to download and install it again).
So I reverted to Python 2.7.3-32bit and Numpy-win32-py27-superpack.
Now I tried CMake and everything works fine. I am not sure what solved the problem, whether VS2012 or Python reinstall or something else (because with the same old setup, 2.4 branch worked fine).
If anyone gets any idea what happened here, feel free to share. !!!
had a similar problem yesterday, after updating my local master branch, there was PYTHON_NUMPY_INCLUDE_DIR as well as PYTHON_NUMPY_INCLUDE_DIRS.
deleting CmakeCache.txt ( even the whole build folder ) solved it for me.
Thank you, I will update and check it.
I updated, but it is still the same. Any idea.
In my case, even the option BUILD_opencv_python is not there.
bwaa. no idea.
cleanup & another git pull maybe ?