Re: Building skia as a static library from Android 5.0 sources

140 views
Skip to first unread message
Message has been deleted

Leon Scroggins

unread,
Dec 6, 2014, 10:01:30 AM12/6/14
to skia-d...@googlegroups.com
Although the makefile was generated using gyp, the generation was designed to generate the same makefile as before.

That said, the gyp generation was also designed to keep up with other Skia build changes, and we may have made changes that affected your use case.

What doesn't work when you make the same change you made to the older version of Skia?

On Sat, Dec 6, 2014 at 4:38 AM, Vivek Kumar <nangal...@gmail.com> wrote:
Hi,

I need to build skia as a static library that I can link against my C++ code.
Earlier I was using skia from Android ICS (4.0.4_r2.1) sources and was able to generate a libskia.a file by making the following changes in file Android.mk inside skia directory:

      I moved libexpat to LOCAL_STATIC_LIBRARIES and changed include(BUILD_SHARED_LIBRARY) to include (BUILD_STATIC_LIBRARY)

Now I need to update the library. So I am trying to build it from Android L sources. But the makefile for updated version is generated using GYP.
What changes do I need to make to create a static library from the new sources??

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.



--
Leon Scroggins III
scr...@google.com

Vivek Kumar

unread,
Dec 6, 2014, 1:57:24 PM12/6/14
to skia-d...@googlegroups.com
Could you please look at the original and modified Makefiles attached (for Android ICS). 
If I make the same changes in Android.mk (for Android Lollipop) and try to build, I get an error saying some module depends on libskia.so.
How can I resolve this error?

PS : Can I generate both shared and static versions of the library?
OriginalAndroid.mk
ModifiedAndroid.mk

Cary Clark

unread,
Dec 8, 2014, 7:42:45 AM12/8/14
to skia-d...@googlegroups.com
It looks like the generated makefile artificially splits Skia into two parts, the base CPU rasterizer and the GPU rasterizer. Since you want to statically link against the whole thing, I would recommend combining the GPU portion into the main body. Also, you can remove the portion of the make file at the bottom labeled 'Build the skia tools'.

Cary
Reply all
Reply to author
Forward
0 new messages