简体   繁体   English

使用cmake为armv7和arm64编译libical

[英]Compiling libical for armv7 and arm64 with cmake

I've gone through the various solutions of compiling libical v1.0 for armv7, however the latest libical library available on github seems to have moved to cmake: 我已经经历了为armv7编译libical v1.0的各种解决方案,但是github上可用的最新libical库似乎已经转向cmake:

https://github.com/libical/libical https://github.com/libical/libical

Can someone please guide me as to what I should be doing to get this to compile for iOS and Mac (one fat static library)? 有人可以指导我如何将其编译为iOS和Mac(一个胖静态库)吗? I've been able to compile it for the Mac but don't know how to do the same for armv7 and arm64. 我已经可以在Mac上编译它,但是不知道如何为armv7和arm64进行相同的编译。 Thanks! 谢谢!

I tried everything from ios-toolchain for cmake to writing a build script myself. 我尝试了从ios-toolchain for cmake到自己编写构建脚本的所有操作。 Nothing worked. 没事。 In the end it turned out to be simple. 最后,事实证明这很简单。 Simply run cmake and compile libical on a 64-bit Mac. 只需在64位Mac上运行cmake并编译libical。 Then take all the produced code from under the "src" directory and add that straight to your iOS project. 然后从“ src”目录下获取所有产生的代码,并将其直接添加到您的iOS项目中。 Then, replace #include with #include "config.h" globally and disable ICU support. 然后,将#include全局替换为#include“ config.h”,并禁用ICU支持。 Add a preprocessor macro to your build settings to include the generated config.h 将预处理器宏添加到构建设置中以包含生成的config.h

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM