XCMake more compatible with Apple. Added OpenCV compatibility