工具以产生Android.mk工具、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 fol...

我有一个大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
阅读全文

相关推荐

最新文章