cmake - 如何使用 Cmake 使用框架?

标签 cmake cmake-gui

对于 Macos,我想链接到某个框架。在 Windows 中,我想链接到某个库。

比如OpenGL Framework,这个需求怎么用cmake来表达?

最佳答案

你可以试试下面的代码:

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

关于cmake - 如何使用 Cmake 使用框架?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27585896/

相关文章:

c++ - CMake 和 VisualStudio : Group files in solution explorer

cmake - 是否可以不在 cmake 中生成 ALL_BUILD 项目?

c++ - 整个项目的 GCC 选项 -ftime-report 摘要

python - 如何使用 CPack 构建 debian 包来执行 setup.py?

c++ - 除非在 target_link_directories() 命令上调用 pthread,否则 CMake 构建失败

visual-studio - Visual Studio 2013和Cmake?

powershell - CMake - 如何轻松添加缺少的库?

c++ - 如何为主机应用程序和任何使用的库使用单独的 CMake 目标?

visual-studio - 如何从 cmake 发送 Visual Studio 配置选项

C++ 错误 : expected primary-expression before ‘;’ token using Cmake