Include opencv2.framework in CMake iOS project with find_library

asked 2014-02-08 14:55:05 -0500

headupinclouds gravatar image

updated 2014-02-08 17:58:26 -0500

I'm trying to include opencv2.framework in my CMake iOS project using the standard Xcode generator. I've verified that my opencv2.framework works as expected when included in an Xcode generated project. The CMake generated Xcode project compiles, and the target app runs fine. I haven't been able to find the correct syntax to include the opencv2.framework in order to start using OpenCV sections of code, nor have I found any references for how to achieve this. I'm even able to include Apple's standard system frameworks in my app using a macro based on find_library, so I can't be too far off. This is admittedly a bit more of a CMake question, but I think there is enough overlap and interest to warrant an opencv workflow related question here, and my previous post to the CMake mailing list has gone unanswered. I expect there are more CMake + opencv2 users on this forum. This post contains fairly specific details regarding what I have tried, but I'll be happy with any solution.

Update: I'm able include the opencv2.framework using find_library if I place it in the Xcode internal folder Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/opencv2.framework (I've created a new post and updated the link above to provide more details).

edit retag flag offensive close merge delete