how to use framework using Cmake?

Adam Lee picture Adam Lee · Dec 21, 2014 · Viewed 10.4k times · Source

For Macos, I'd like to link to some framework. In windows, I would like to link to some library.

For example, OpenGL Framework, how to express this requirement using cmake?

Answer

Wensheng Yang picture Wensheng Yang · Feb 4, 2015

You could try the following code:

target_link_libraries(<target name>
    "-framework AVFoundation"
    "-framework CoreGraphics"
    "-framework CoreMotion"
    "-framework Foundation"
    "-framework MediaPlayer"
    "-framework OpenGLES"
    "-framework QuartzCore"
    "-framework UIKit"
    )