使用cmake为armv7和arm64编译libical [英] Compiling libical for armv7 and arm64 with cmake

查看:263
本文介绍了使用cmake为armv7和arm64编译libical的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经经历了为armv7编译libical v1.0的各种解决方案,但是github上可用的最新libical库似乎已经转向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:

https://github.com/libical/libical

有人可以指导我如何将其编译为适用于iOS和Mac(一个胖静态库)的方法吗?我已经可以在Mac上编译它,但是不知道如何为armv7和arm64进行相同的编译.谢谢!

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)? I've been able to compile it for the Mac but don't know how to do the same for armv7 and arm64. Thanks!

推荐答案

我尝试了从ios-toolchain for cmake到自己编写构建脚本的所有方法.没事.最后,事实证明这很简单.只需在64位Mac上运行cmake并编译libical.然后从"src"目录下获取所有产生的代码,并将其直接添加到您的iOS项目中.然后,将#include全局替换为#include"config.h",并禁用ICU支持.将预处理器宏添加到构建设置中,以包含生成的config.h

I tried everything from ios-toolchain for cmake to writing a build script myself. Nothing worked. In the end it turned out to be simple. Simply run cmake and compile libical on a 64-bit Mac. Then take all the produced code from under the "src" directory and add that straight to your iOS project. Then, replace #include with #include "config.h" globally and disable ICU support. Add a preprocessor macro to your build settings to include the generated config.h

这篇关于使用cmake为armv7和arm64编译libical的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆