Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile skia on Windows

Tags:

skia

skiasharp

I tried compiling skia on Windows as suggested in https://skia.org/user/build

1> bin/gn gen out/Static --args='is_official_build=true'

2> ninja -C out/Static

Build fails to find libjpeg.h, libpng.h

Then I added following line in gn args

extra_cflags = ["-I ../../third_party/externals/libpng/", "-I ../../third_party/externals/libjpeg-turbo/"]

It still fails to find both the headers.

But the point is that I should not pass include path because it should be handled internally if JPEG/PNG is core part of skia.

How do I build it on Windows?

like image 878
david Avatar asked May 08 '18 07:05

david


2 Answers

I did it like here:

bin/gn gen out/Static --args='is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_system_icu=false skia_use_system_harfbuzz=false'

Under windows 10 x64

like image 169
Dmitriy Adzhiev Avatar answered Oct 17 '22 04:10

Dmitriy Adzhiev


I could compile skia on windows using following args

gn gen out/Static --args='is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false'
like image 3
david Avatar answered Oct 17 '22 04:10

david