[CMake] Need to add a OSX framework at cmake command line

Asiga Nael asiganael at yahoo.com
Sat Jun 14 12:44:33 EDT 2014


Hi,

I don't know how to manage projects with cmake, but I need to build an application without modifying its source nor the CMakeLists.txt file.

Everything compiles fine, the only problem is at the link time: It's not adding the Cocoa framework ("-framework Cocoa") at the end of the link line, so it fails in this moment.

The cause of the problem seems to be that I'm using an static build of SDL. The cmake SDL find module successfully adds "-framework Cocoa" after SDL when SDL is a shared library. However, if it's an static library, it's not added.

Isn't there any way for me to tell cmake to manually add "-framework Cocoa" at the end of the link line? As I said, this should be done at the command line, since I cannot edit CMakeLists.txt

Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140614/06c2b37a/attachment-0001.html>


More information about the CMake mailing list