工具以产生Android.mk [英] Tool to generate an Android.mk

查看:120
本文介绍了工具以产生Android.mk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大C ++项目有位于一堆的子文件夹中,约有百源文件。他们利用X code IDE初步发展,所以没有生成文件存在。

I have a big C++ project that has about hundred source files that are located in a bunch of sub folders. They were initially developed using Xcode IDE, so there are no makefiles there.

现在我需要建立它使用NDK的Andr​​oid。我知道如何创建Android.mk但我不知道是否有任何的可视化工具或者脚本,可以做到这一点(或者至少是基本结构)自动(也许不服,像CMake的),或者做我必须做手工的一切(我会花费了大量的时间,这个......)?

Now I need to build it for Android using NDK. I understand how to create Android.mk but I wonder is there any visual tool or maybe script that can do this (or at least basic structure) automatically (maybe smth. like cmake) or do I have to do everything manually (I'll spend a lot of time for this...) ?

推荐答案

那么你实际上可以使用CMake的。我在几个项目做到采用了android NDK工具链,而我从这个花了修改后的脚本项目来自初始端口到Android的OpenCV库。

Well you actually can use cmake. I do so in several projects using android ndk toolchain and a modified script that I took from this project that comes from the initial port to android of OpenCV library.

如果你不想使用这些脚本作为CMAKE_TOOLCHAIN​​_FILE(我没有想太多),你可以这样做:

If you don't want to use those scripts as a CMAKE_TOOLCHAIN_FILE (I did not want too) you can do something like:

# Setting android build
SET(CMAKE_TOOLCHAIN_FILE ${CMAKE_MODULE}/android.toolchain.cmake)
# Project name 
PROJECT (YOUR_PROJECT CXX C)

.. configure your project here

这篇关于工具以产生Android.mk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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