CMake:将框架复制到App Bundle中 [英] CMake: Copy Frameworks into App Bundle
问题描述
在我的项目目录中,我有一些第三方框架,即SFML,当我构建我的应用程序,我需要复制到应用程序包。
In my project directory I have some 3rd party frameworks, namely SFML, that I need to copy into the app bundle when I build my app. Any clean way to do that (maybe like the Copy Files Build Phase in Xcode)?
感谢
推荐答案
您应该查看CMake的BundleUtilities模块。
You should check out CMake's BundleUtilities module.
有一个wiki条目,包含一个功能示例应用程序:
There's a wiki entry complete with a functioning sample app here:
http://www.cmake.org/Wiki/BundleUtilitiesExample
BundleUtilities模块的文档在这里:
The documentation for the BundleUtilities module is here:
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#module :BundleUtilities
我建议配置一个适当调用fixup_bundle的CMake -P脚本,然后使用CMakeinstall(SCRIPT ...)命令调用该脚本在安装时。稍后再询问更多具体问题,如果您遇到此方法的任何问题,或有一些不清楚的示例或文档。
I recommend configuring a CMake -P script that calls fixup_bundle appropriately and then using a CMake "install(SCRIPT ...)" command to call that script at install time. Ask more specific questions later if you run into any problems with this approach, or if there's something unclear about the example or documentation.
这篇关于CMake:将框架复制到App Bundle中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!